aboutsummaryrefslogtreecommitdiff
path: root/collect.py
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-12-15 19:31:46 +0100
committerLinnea Gräf <nea@nea.moe>2024-12-15 19:31:46 +0100
commita2f73de90fb9c9d0ea7a5e7e9e6b9e445a8094ee (patch)
tree4b612c6451c695822885c29e9f497e2826dc3bbd /collect.py
parent0a4cf1fbcc897462f31aaadc5c868d12d13e1abb (diff)
downloadLocalTransactionLedger-a2f73de90fb9c9d0ea7a5e7e9e6b9e445a8094ee.tar.gz
LocalTransactionLedger-a2f73de90fb9c9d0ea7a5e7e9e6b9e445a8094ee.tar.bz2
LocalTransactionLedger-a2f73de90fb9c9d0ea7a5e7e9e6b9e445a8094ee.zip
refactor: Move DI to its own package
Diffstat (limited to 'collect.py')
-rw-r--r--collect.py11
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)