From fa0a8185a68e8e5b034d59d81d9af5b06fbdb655 Mon Sep 17 00:00:00 2001 From: techno-sam <77073745+techno-sam@users.noreply.github.com> Date: Sun, 1 Dec 2024 10:13:17 -0800 Subject: [PATCH] Remove gen_json.py --- gen_json.py | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100755 gen_json.py diff --git a/gen_json.py b/gen_json.py deleted file mode 100755 index ed7dfcc..0000000 --- a/gen_json.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/python3 -import urllib.request -import json - -names = [] - -with open("dev_capes.txt") as f: - for line in f: - names.append(line.strip()) - -names = sorted(list(set(names))) -names = [name for name in names if name != ""] - -uuids = {} - -for name in names: - print("Getting UUID for "+name) - with urllib.request.urlopen("https://api.ashcon.app/mojang/v2/user/"+name) as f: - dat = json.load(f) - uuids[name] = dat["uuid"] - - -full_data = { - "dev": [ - { - "id": v, - "name": k - } for k, v in uuids.items() - ] -} - -with open("dev_capes.json", "w") as f: - json.dump(full_data, f, indent=4) - print("Wrote to dev_capes.json") \ No newline at end of file