test
All checks were successful
Update wiki / test (push) Successful in 13s

This commit is contained in:
Ashley Graves 2024-07-28 22:39:28 +02:00
parent 57727c0b0d
commit 5755597c69

View file

@ -8,6 +8,10 @@ def noop():
return return
mods = dict() mods = dict()
count = dict()
count["server"] = 0
count["client"] = 0
count["both"] = 0
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:
@ -22,12 +26,32 @@ for mod in glob.glob("pack/mods/*.toml"):
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
moddata["side"] = data["side"] moddata["side"] = data["side"]
mods[data["name"]] = moddata mods[data["name"]] = moddata
with open("wiki/Modlist.md", "w") as f: with open("wiki/Modlist.md", "w") as f:
f.write("## Total Count")
f.write("<table>")
f.write("\r\n<tr>")
f.write("<th>Side</th>")
f.write("<th>Count</th>")
f.write("</tr>\r\n")
f.write("\r\n<tr>")
f.write("<td>Client</td>")
f.write("<td>" + str(count["client"] + count["both"]) + "</td>")
f.write("</tr>\r\n")
f.write("\r\n<tr>")
f.write("<td>Server</td>")
f.write("<td>" + str(count["server"] + count["both"]) + "</td>")
f.write("</tr>\r\n")
f.write("\r\n</table>")
f.write("## Individual Mods")
f.write("<table>") f.write("<table>")
f.write("\r\n<tr>") f.write("\r\n<tr>")
f.write("<th>Name</th>") f.write("<th>Name</th>")
@ -44,3 +68,4 @@ with open("wiki/Modlist.md", "w") as f:
else: else:
f.write("<td>N/A</td>") f.write("<td>N/A</td>")
f.write("\r\n<tr>") f.write("\r\n<tr>")
f.write("\r\n</table>")