parent
4425407733
commit
6bda98fd9d
1 changed files with 17 additions and 3 deletions
|
@ -4,16 +4,30 @@ from pip._vendor import tomli
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
def noop():
|
||||||
|
return
|
||||||
|
|
||||||
mods = dict()
|
mods = dict()
|
||||||
|
|
||||||
for mod in glob.glob("pack/mods/*.toml"):
|
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)
|
||||||
url = ""
|
url = ""
|
||||||
if "modrinth" in data.update:
|
|
||||||
|
# there has to be a better way to do this
|
||||||
|
|
||||||
|
try:
|
||||||
|
print("MR: " + data.update.modrinth["mod-id"]
|
||||||
url = "https://modrinth.com/mod/" + data.update.modrinth["mod-id"]
|
url = "https://modrinth.com/mod/" + data.update.modrinth["mod-id"]
|
||||||
elif "curseforge" in data.update:
|
catch:
|
||||||
url = "https://legacy.curseforge.com/mod/" + data.update.modrinth["mod-id"]
|
noop()
|
||||||
|
|
||||||
|
try:
|
||||||
|
print("CF: " + data.update.curseforge["mod-id"]
|
||||||
|
url = "http://dev.bukkit.org/bukkit-plugins/" + data.update.curseforge["mod-id"]
|
||||||
|
catch:
|
||||||
|
noop()
|
||||||
|
|
||||||
mods[data.name] = url
|
mods[data.name] = url
|
||||||
|
|
||||||
with open("wiki/Modlist.md", "w") as f:
|
with open("wiki/Modlist.md", "w") as f:
|
||||||
|
|
Loading…
Reference in a new issue