diff options
Diffstat (limited to 'collect.py')
-rw-r--r-- | collect.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/collect.py b/collect.py new file mode 100644 index 0000000..2a33435 --- /dev/null +++ b/collect.py @@ -0,0 +1,11 @@ +import json +from pathlib import Path + +repo = Path("/home/nea/src/NotEnoughUpdates-REPO") +l = {} +for f in (repo / "items").glob("*.json"): + with f.open('r') as fp: + j = json.load(fp) + l[j["internalname"]] = j["displayname"] +with Path("./compiled.json").open("w") as fp: + json.dump(l, fp) |