From a2f73de90fb9c9d0ea7a5e7e9e6b9e445a8094ee Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Sun, 15 Dec 2024 19:31:46 +0100 Subject: refactor: Move DI to its own package --- collect.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 collect.py (limited to 'collect.py') 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) -- cgit