Skip to content
Snippets Groups Projects
Commit ee0a5f56 authored by Donatus Herre's avatar Donatus Herre
Browse files

del script

parent 0aaf9878
Branches
No related tags found
No related merge requests found
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Creator: D. Herre
GitLab: dikon/cph-gnd
Created: 2020-04-30
Last Modified: 2020-04-30
"""
from librair.parsers import Beacon
from librair.schemas import json
BEACON = "https://dikon.gitlab.io/cph-beacon/data/gnd.txt"
HREF = "edits/index1694-href.txt"
NAMES = "edits/index1694-names.txt"
OUT = "data/index1694.json"
href = []
with open(HREF, 'r', encoding="utf-8") as f:
href = [l.strip() for l in f.readlines()]
names = []
with open(NAMES, 'r', encoding="utf-8") as f:
names = [l.strip() for l in f.readlines()]
cph = Beacon(url=BEACON)
gnds = []
for i, target in enumerate(cph.targets):
if target[1] in href:
pos = href.index(target[1])
gnds.append(cph.links[i])
json.writer(gnds, OUT)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment