parent
c3c3b8a209
commit
7b12f0a38d
1 changed files with 3 additions and 5 deletions
|
@ -17,7 +17,6 @@ cache = dict()
|
||||||
if os.path.isfile("cache/licenses.json"):
|
if os.path.isfile("cache/licenses.json"):
|
||||||
with open("cache/licenses.json", "r") as f:
|
with open("cache/licenses.json", "r") as f:
|
||||||
cache = json.load(f)
|
cache = json.load(f)
|
||||||
print(cache)
|
|
||||||
|
|
||||||
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:
|
||||||
|
@ -99,15 +98,14 @@ with open("wiki/Modlist.md", "w") as f:
|
||||||
|
|
||||||
with open("wiki/Licenses.md", "w") as f:
|
with open("wiki/Licenses.md", "w") as f:
|
||||||
for mod in mods:
|
for mod in mods:
|
||||||
data = mods[mod]
|
data = mods[mod]["license"]
|
||||||
print(data)
|
|
||||||
f.write("## " + mod + "\r\n")
|
f.write("## " + mod + "\r\n")
|
||||||
f.write("<b>")
|
f.write("<b>")
|
||||||
if "license" in data:
|
if "license" in data:
|
||||||
if data["license"]["url"] != None:
|
if data["license"]["url"] != None:
|
||||||
f.write("<a href=\"" + data["license"]["url"] + "\">" + data["license"] + "")
|
f.write("<a href=\"" + data["url"] + "\">" + data["name"] + "")
|
||||||
else:
|
else:
|
||||||
f.write(data["license"]["name"])
|
f.write(data["name"])
|
||||||
else:
|
else:
|
||||||
f.write("Unknown")
|
f.write("Unknown")
|
||||||
f.write("</b>\r\n")
|
f.write("</b>\r\n")
|
||||||
|
|
Loading…
Reference in a new issue