This commit is contained in:
parent
b3e2c220ee
commit
88bbafe19a
1 changed files with 8 additions and 2 deletions
|
@ -42,7 +42,6 @@ for mod in glob.glob("pack/mods/*.toml"):
|
||||||
elif "curseforge" in data["update"]:
|
elif "curseforge" in data["update"]:
|
||||||
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
|
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
|
||||||
moddata["site"] = "CurseForge"
|
moddata["site"] = "CurseForge"
|
||||||
moddata["license"] = "CurseForge API does not provide mod licenses. See mod page for details."
|
|
||||||
|
|
||||||
count[moddata["side"]] += 1
|
count[moddata["side"]] += 1
|
||||||
mods[moddata["name"]] = moddata
|
mods[moddata["name"]] = moddata
|
||||||
|
@ -102,10 +101,17 @@ with open("wiki/Licenses.md", "w") as f:
|
||||||
data = mods[mod]
|
data = mods[mod]
|
||||||
f.write("## " + mod + "\r\n")
|
f.write("## " + mod + "\r\n")
|
||||||
f.write("<b>")
|
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:
|
if "license" in data:
|
||||||
license = data["license"]
|
license = data["license"]
|
||||||
if license["name"] == "":
|
if license["name"] == "":
|
||||||
license["name"] = "Custom"
|
if license["id"] == "LicenseRef-Custom":
|
||||||
|
license["name"] = "Custom"
|
||||||
|
else:
|
||||||
|
license["name"] = license["id"][11:].replace("-", " ")
|
||||||
|
|
||||||
if license["url"] != None:
|
if license["url"] != None:
|
||||||
f.write("<a href=\"" + license["url"] + "\">" + license["name"] + "</a>")
|
f.write("<a href=\"" + license["url"] + "\">" + license["name"] + "</a>")
|
||||||
|
|
Loading…
Reference in a new issue