test
Some checks failed
Update wiki / test (push) Failing after 47s

This commit is contained in:
Ashley Graves 2024-08-01 01:15:41 +02:00
parent ab73dcbff0
commit 5044cdd17a

View file

@ -18,7 +18,9 @@ for mod in glob.glob("pack/mods/*.toml"):
with open(mod, "r") as f: with open(mod, "r") as f:
data = tomli.load(f) data = tomli.load(f)
moddata = dict() moddata = dict()
moddata["name"] = data["name"]
moddata["url"] = "" moddata["url"] = ""
moddata["side"] = data["side"]
if "modrinth" in data["update"]: if "modrinth" in data["update"]:
id = data["update"]["modrinth"]["mod-id"] id = data["update"]["modrinth"]["mod-id"]
@ -27,15 +29,12 @@ for mod in glob.glob("pack/mods/*.toml"):
moddata["site"] = "Modrinth" moddata["site"] = "Modrinth"
data = requests.get("https://api.modrinth.com/v2/project/" + id).json() data = requests.get("https://api.modrinth.com/v2/project/" + id).json()
print(data)
exit
elif "curseforge" in data["update"]: elif "curseforge" in data["update"]:
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"]) moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
moddata["site"] = "CurseForge" moddata["site"] = "CurseForge"
count[data["side"]] += 1 count[moddata["side"]] += 1
moddata["side"] = data["side"] mods[moddata["name"]] = moddata
mods[data["name"]] = moddata
with open("wiki/Modlist.md", "w") as f: with open("wiki/Modlist.md", "w") as f: