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

This commit is contained in:
Ashley Graves 2024-07-27 14:48:06 +02:00
parent 51457087d4
commit 0732814066

View file

@ -4,9 +4,19 @@ from pip._vendor import tomli
import glob import glob
import os import os
#print(os.environ["GITHUB_TOKEN"]) mods = dict()
for mod in glob.glob("pack/mods/*.toml"): for mod in glob.glob("pack/mods/*.toml"):
print(mod)
with open(mod, "r") as f: with open(mod, "r") as f:
data = tomli.load(f) data = tomli.load(f)
print(data) url = ""
if data.update.modrinth:
url = "https://modrinth.com/mod/" + data.update.modrinth["mod-id"]
elif data.update.curseforge:
url = "https://legacy.curseforge.com/mod/" + data.update.modrinth["mod-id"]
mods[data.name] = url
with open("wiki/Modlist.md", "w") as f:
for mod in mods:
f.write("- [" + mod + "](" + mods[mod] + ")\r\n")