Skip to content

Instantly share code, notes, and snippets.

@edsu
Created May 14, 2021 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edsu/067316792da5d17493b08339fd146652 to your computer and use it in GitHub Desktop.
Save edsu/067316792da5d17493b08339fd146652 to your computer and use it in GitHub Desktop.
import json
docs = json.load(open('Projects/airwaves/static/data/documents.json'))
for e in json.load(open('Projects/airwaves/static/data/episodes.json')):
for s in e['subject']:
for d in docs:
related = None
for s2 in d['subject']:
if s['name'] == s2['name']:
related = s['name']
break
if related:
print('\t'.join([e['aapbId'], d['iaId'], related]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment