Skip to content

Commit

Permalink
#95 Add calls to formatting files in update_data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Jan 12, 2022
1 parent 3713d00 commit 753123a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Data/update_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import json
import os
import sys
from subprocess import call

from tqdm.auto import tqdm
from wikidataintegrator import wdi_core
Expand Down Expand Up @@ -120,5 +121,14 @@

results_formatted.append(r_dict)

with open("./example.json", "w", encoding="utf-8",) as f:
json.dump(results_formatted, f, ensure_ascii=False, indent=2)
with open(
f"./{q.split('/')[0]}/{q.split('/')[1]}/{q.split('/')[1]}Queried.json",
"w",
encoding="utf-8",
) as f:
json.dump(results_formatted, f, ensure_ascii=False, indent=2)

call(
["python", f"./{q.split('/')[0]}/{q.split('/')[1]}/format_{q.split('/')[1]}"],
shell=True,
)

0 comments on commit 753123a

Please sign in to comment.