parent
51457087d4
commit
0732814066
1 changed files with 13 additions and 3 deletions
|
@ -4,9 +4,19 @@ from pip._vendor import tomli
|
|||
import glob
|
||||
import os
|
||||
|
||||
#print(os.environ["GITHUB_TOKEN"])
|
||||
mods = dict()
|
||||
|
||||
for mod in glob.glob("pack/mods/*.toml"):
|
||||
print(mod)
|
||||
with open(mod, "r") as f:
|
||||
data = tomli.load(f)
|
||||
print(data)
|
||||
url = ""
|
||||
if data.update.modrinth:
|
||||
url = "https://modrinth.com/mod/" + data.update.modrinth["mod-id"]
|
||||
elif data.update.curseforge:
|
||||
url = "https://legacy.curseforge.com/mod/" + data.update.modrinth["mod-id"]
|
||||
|
||||
mods[data.name] = url
|
||||
|
||||
with open("wiki/Modlist.md", "w") as f:
|
||||
for mod in mods:
|
||||
f.write("- [" + mod + "](" + mods[mod] + ")\r\n")
|
||||
|
|
Loading…
Reference in a new issue