test
All checks were successful
Update wiki / test (push) Successful in 20s

This commit is contained in:
Ashley Graves 2024-08-01 01:52:19 +02:00
parent b3e2c220ee
commit 88bbafe19a

View file

@ -42,7 +42,6 @@ for mod in glob.glob("pack/mods/*.toml"):
elif "curseforge" in data["update"]:
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
moddata["site"] = "CurseForge"
moddata["license"] = "CurseForge API does not provide mod licenses. See mod page for details."
count[moddata["side"]] += 1
mods[moddata["name"]] = moddata
@ -102,10 +101,17 @@ with open("wiki/Licenses.md", "w") as f:
data = mods[mod]
f.write("## " + mod + "\r\n")
f.write("<b>")
if data["site"] == "CurseForge":
f.write("CurseForge API does not provide license information, see mod page for details.")
continue
if "license" in data:
license = data["license"]
if license["name"] == "":
if license["id"] == "LicenseRef-Custom":
license["name"] = "Custom"
else:
license["name"] = license["id"][11:].replace("-", " ")
if license["url"] != None:
f.write("<a href=\"" + license["url"] + "\">" + license["name"] + "</a>")