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:
|
with open(mod, "r") as f:
|
||||||
data = tomli.load(f)
|
data = tomli.load(f)
|
||||||
moddata = dict()
|
moddata = dict()
|
||||||
|
moddata["name"] = data["name"]
|
||||||
moddata["url"] = ""
|
moddata["url"] = ""
|
||||||
|
moddata["side"] = data["side"]
|
||||||
|
|
||||||
if "modrinth" in data["update"]:
|
if "modrinth" in data["update"]:
|
||||||
id = data["update"]["modrinth"]["mod-id"]
|
id = data["update"]["modrinth"]["mod-id"]
|
||||||
|
@ -27,15 +29,12 @@ 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(data)
|
|
||||||
exit
|
|
||||||
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"
|
||||||
|
|
||||||
count[data["side"]] += 1
|
count[moddata["side"]] += 1
|
||||||
moddata["side"] = data["side"]
|
mods[moddata["name"]] = moddata
|
||||||
mods[data["name"]] = moddata
|
|
||||||
|
|
||||||
|
|
||||||
with open("wiki/Modlist.md", "w") as f:
|
with open("wiki/Modlist.md", "w") as f:
|
||||||
|
|
Loading…
Reference in a new issue