diff options
Diffstat (limited to 'extra/abbrev/parse.py')
-rw-r--r-- | extra/abbrev/parse.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/extra/abbrev/parse.py b/extra/abbrev/parse.py deleted file mode 100644 index 93700ff..0000000 --- a/extra/abbrev/parse.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python - -import fileinput -import json - -# {"children":[{"tag":"b"}],"tag":"dt","text":"A + U-ARCHITECTURE AND URBANISM"} -# {"children":[{"tag":"b","text":"A U-ARCHIT URBAN"}],"tag":"dd"} -# {"children":[{"tag":"b"}],"tag":"dt","text":"A CRITICAL REVIEW: LASER TECHNOLOGIES FOR DEFENSE AND SECURITY"} -# {"children":[{"tag":"b","text":"P SOC PHOTO-OPT INS"}],"tag":"dd"} -# {"children":[{"tag":"b"}],"tag":"dt","text":"A KALEIDOSCOPIC VIEW OF NATURAL RESOURCES"} -# {"children":[{"tag":"b"}],"tag":"dd"} -# {"children":[{"tag":"b"}],"tag":"dt","text":"A MIDSUMMER NIGHT'S DREAM"} -# {"children":[{"tag":"b","text":"SHAKESPEARE SURV"}],"tag":"dd"} -# {"children":[{"tag":"b"}],"tag":"dt","text":"A N A E-APPROCHE NEUROPSYCHOLOGIQUE DES APPRENTISSAGES CHEZ L ENFANT"} - -current = {} -for i, line in enumerate(fileinput.input()): - line = line.strip() - doc = json.loads(line) - if i % 2 == 0: - current["name"] = doc.get("text") - else: - current["abbr"] = doc["children"][0].get("text") - print(current) - current = {} |