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

This commit is contained in:
Ashley Graves 2024-08-01 01:10:17 +02:00
parent 57fbbd9792
commit 09a5ac4181

View file

@ -22,6 +22,7 @@ for mod in glob.glob("pack/mods/*.toml"):
if "modrinth" in data["update"]:
moddata["url"] = "https://modrinth.com/mod/" + data["update"]["modrinth"]["mod-id"]
moddata["site"] = "Modrinth"
moddata["license"] = ""
elif "curseforge" in data["update"]:
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
moddata["site"] = "CurseForge"
@ -70,12 +71,24 @@ with open("wiki/Modlist.md", "w") as f:
f.write("</tr>\r\n")
for mod in mods:
data = mods[mod]
f.write("\r\n<tr>")
f.write("<td>" + mod + "</td>")
f.write("<td>" + mods[mod]["side"] + "</td>")
if mods[mod]["url"] != "":
f.write("<td><a href=\"" + mods[mod]["url"] + "\">" + mods[mod]["site"] + "</a></td>")
f.write("<td>" + data["side"] + "</td>")
if data["url"] != "":
f.write("<td><a href=\"" + data["url"] + "\">" + data["site"] + "</a></td>")
else:
f.write("<td>N/A</td>")
f.write("\r\n</tr>")
f.write("\r\n</table>")
with open("wiki/Licenses.md", "w") as f:
for mod in mods:
data = mods[mod]
f.write("## " + mod + "\r\n")
f.write("<b>")
if data["license"]["url"] != None:
f.write("<a href=\"" + data["license"]["url"] + "\">" + data["license"] + "")
else:
f.write(data["license"]["name"])
f.write("</b>\r\n")