Commit 6b7f3cce authored by donatus.herre's avatar donatus.herre
Browse files

fridericiana updated

parent 457ffccd
......@@ -14,7 +14,7 @@ from librair.schemas import json
BEACON = "https://dikon.gitlab.io/cph-beacon/gnd.txt"
HREF = "data/index1694-href.txt"
NAMES = "data/index1694-names.txt"
MAP = "data/index1694-map.json"
MAPPING = "data/index1694-map.json"
href = []
with open(HREF, 'r', encoding="utf-8") as f:
......@@ -26,13 +26,13 @@ with open(NAMES, 'r', encoding="utf-8") as f:
cph = Beacon(url=BEACON)
map = {}
mapping = {}
for i, target in enumerate(cph.targets):
if target[1] in href:
pos = href.index(target[1])
map[cph.links[i]] = {"name": names[pos],
"target": target[1],
"wikidata": target[0]}
mapping[cph.links[i]] = {"name": names[pos],
"target": target[1],
"wikidata": target[0]}
json.writer(map, MAP)
json.writer(mapping, MAPPING)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment