parent
ab73dcbff0
commit
5044cdd17a
1 changed files with 4 additions and 5 deletions
|
@ -18,7 +18,9 @@ for mod in glob.glob("pack/mods/*.toml"):
|
|||
with open(mod, "r") as f:
|
||||
data = tomli.load(f)
|
||||
moddata = dict()
|
||||
moddata["name"] = data["name"]
|
||||
moddata["url"] = ""
|
||||
moddata["side"] = data["side"]
|
||||
|
||||
if "modrinth" in data["update"]:
|
||||
id = data["update"]["modrinth"]["mod-id"]
|
||||
|
@ -27,15 +29,12 @@ for mod in glob.glob("pack/mods/*.toml"):
|
|||
moddata["site"] = "Modrinth"
|
||||
|
||||
data = requests.get("https://api.modrinth.com/v2/project/" + id).json()
|
||||
print(data)
|
||||
exit
|
||||
elif "curseforge" in data["update"]:
|
||||
moddata["url"] = "https://legacy.curseforge.com/projects/" + str(data["update"]["curseforge"]["project-id"])
|
||||
moddata["site"] = "CurseForge"
|
||||
|
||||
count[data["side"]] += 1
|
||||
moddata["side"] = data["side"]
|
||||
mods[data["name"]] = moddata
|
||||
count[moddata["side"]] += 1
|
||||
mods[moddata["name"]] = moddata
|
||||
|
||||
|
||||
with open("wiki/Modlist.md", "w") as f:
|
||||
|
|
Loading…
Reference in a new issue