parent
0732814066
commit
6b3eebe9dd
1 changed files with 6 additions and 4 deletions
|
@ -10,13 +10,15 @@ for mod in glob.glob("pack/mods/*.toml"):
|
|||
with open(mod, "r") as f:
|
||||
data = tomli.load(f)
|
||||
url = ""
|
||||
if data.update.modrinth:
|
||||
if "modrinth" in data.update:
|
||||
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"]
|
||||
|
||||
mods[data.name] = url
|
||||
|
||||
with open("wiki/Modlist.md", "w") as f:
|
||||
for mod in mods:
|
||||
if mods[mod] != "":
|
||||
f.write("- [" + mod + "](" + mods[mod] + ")\r\n")
|
||||
else:
|
||||
f.write("- " + mod + "\r\n")
|
||||
|
|
Loading…
Reference in a new issue