parent
5044cdd17a
commit
8ce95e38a8
1 changed files with 7 additions and 3 deletions
|
@ -29,6 +29,7 @@ for mod in glob.glob("pack/mods/*.toml"):
|
||||||
moddata["site"] = "Modrinth"
|
moddata["site"] = "Modrinth"
|
||||||
|
|
||||||
data = requests.get("https://api.modrinth.com/v2/project/" + id).json()
|
data = requests.get("https://api.modrinth.com/v2/project/" + id).json()
|
||||||
|
print("Processed: " + moddata["name"])
|
||||||
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"
|
||||||
|
@ -92,8 +93,11 @@ 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["license"] != None:
|
||||||
if data["license"]["url"] != None:
|
if data["license"]["url"] != None:
|
||||||
f.write("<a href=\"" + data["license"]["url"] + "\">" + data["license"] + "")
|
f.write("<a href=\"" + data["license"]["url"] + "\">" + data["license"] + "")
|
||||||
else:
|
else:
|
||||||
f.write(data["license"]["name"])
|
f.write(data["license"]["name"])
|
||||||
|
else:
|
||||||
|
f.write("Unknown")
|
||||||
f.write("</b>\r\n")
|
f.write("</b>\r\n")
|
||||||
|
|
Loading…
Reference in a new issue