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

This commit is contained in:
Ashley Graves 2024-07-27 14:49:15 +02:00
parent 0732814066
commit 6b3eebe9dd

View file

@ -10,13 +10,15 @@ 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)
url = "" url = ""
if data.update.modrinth: if "modrinth" in data.update:
url = "https://modrinth.com/mod/" + data.update.modrinth["mod-id"] url = "https://modrinth.com/mod/" + data.update.modrinth["mod-id"]
elif data.update.curseforge: elif "curseforge" data.update:
url = "https://legacy.curseforge.com/mod/" + data.update.modrinth["mod-id"] url = "https://legacy.curseforge.com/mod/" + data.update.modrinth["mod-id"]
mods[data.name] = url mods[data.name] = url
with open("wiki/Modlist.md", "w") as f: with open("wiki/Modlist.md", "w") as f:
for mod in mods: for mod in mods:
if mods[mod] != "":
f.write("- [" + mod + "](" + mods[mod] + ")\r\n") f.write("- [" + mod + "](" + mods[mod] + ")\r\n")
else:
f.write("- " + mod + "\r\n")