Cleanup
This commit is contained in:
parent
45c398973f
commit
f23ce05856
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
# Ignore built pack files
|
||||
*.mrpack
|
||||
mods.dot
|
@ -161,6 +161,10 @@ metafile = true
|
||||
file = "mods/starlight.pw.toml"
|
||||
metafile = true
|
||||
|
||||
[[files]]
|
||||
file = "mods/terra.pw.toml"
|
||||
metafile = true
|
||||
|
||||
[[files]]
|
||||
file = "mods/viafabricplus.pw.toml"
|
||||
metafile = true
|
||||
@ -189,6 +193,10 @@ metafile = true
|
||||
file = "mods/yacl.pw.toml"
|
||||
metafile = true
|
||||
|
||||
[[files]]
|
||||
file = "mods/your-reputation.pw.toml"
|
||||
metafile = true
|
||||
|
||||
[[files]]
|
||||
file = "mods/zoomify.pw.toml"
|
||||
metafile = true
|
||||
|
@ -1,13 +0,0 @@
|
||||
name = "Collective"
|
||||
filename = "collective-1.20.4-7.30.jar"
|
||||
side = "both"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/e0M1UDsY/versions/Avo0Ze46/collective-1.20.4-7.30.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "b69788c7acf9e341d972111a904ab57a76671a14"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "e0M1UDsY"
|
||||
version = "Avo0Ze46"
|
@ -1,13 +1,13 @@
|
||||
name = "Fabric API"
|
||||
filename = "fabric-api-0.95.1+1.20.4.jar"
|
||||
filename = "fabric-api-0.95.3+1.20.4.jar"
|
||||
side = "both"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/TvatZFJI/fabric-api-0.95.1%2B1.20.4.jar"
|
||||
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/dBMtQPll/fabric-api-0.95.3%2B1.20.4.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "ffda830e5741660e14e1880e8d6b500acd6f58c5"
|
||||
hash = "4477a4eb5a9741501346b565ee7d3e0f534483c1"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "P7dR8mSH"
|
||||
version = "TvatZFJI"
|
||||
version = "dBMtQPll"
|
||||
|
@ -1,13 +1,13 @@
|
||||
name = "Iris Shaders"
|
||||
filename = "iris-mc1.20.4-1.6.14.jar"
|
||||
filename = "iris-mc1.20.4-1.6.15.jar"
|
||||
side = "client"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/YL57xq9U/versions/Xl7oywRL/iris-mc1.20.4-1.6.14.jar"
|
||||
url = "https://cdn.modrinth.com/data/YL57xq9U/versions/dtaGVXSk/iris-mc1.20.4-1.6.15.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "7e62bb2851f2afc06946ea3fc170173528aefdbb"
|
||||
hash = "561a3fe8e7497262d700a2ef0d03a566dd2cd4d4"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "YL57xq9U"
|
||||
version = "Xl7oywRL"
|
||||
version = "dtaGVXSk"
|
||||
|
@ -1,13 +0,0 @@
|
||||
name = "oωo (owo-lib)"
|
||||
filename = "owo-lib-0.12.3+1.20.3.jar"
|
||||
side = "both"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/ccKDOlHs/versions/HYGIKGSR/owo-lib-0.12.3%2B1.20.3.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "efb4191d1a24a077c2f1187e768a49419e8cb47b"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "ccKDOlHs"
|
||||
version = "HYGIKGSR"
|
@ -1,13 +1,13 @@
|
||||
name = "Reese's Sodium Options"
|
||||
filename = "reeses_sodium_options-1.7.0+mc1.20.2-build.97.jar"
|
||||
filename = "reeses_sodium_options-1.7.1+mc1.20.4-build.100.jar"
|
||||
side = "client"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/Bh37bMuy/versions/YxKBGhki/reeses_sodium_options-1.7.0%2Bmc1.20.2-build.97.jar"
|
||||
url = "https://cdn.modrinth.com/data/Bh37bMuy/versions/Iukh1sNN/reeses_sodium_options-1.7.1%2Bmc1.20.4-build.100.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "5ab271d5c698f96618f717a231218810afc927b0"
|
||||
hash = "180b2e0ca8d3837348b7252856265b57a5fa5424"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "Bh37bMuy"
|
||||
version = "YxKBGhki"
|
||||
version = "Iukh1sNN"
|
||||
|
@ -1,6 +1,6 @@
|
||||
name = "Roughly Enough Items (REI)"
|
||||
filename = "RoughlyEnoughItems-14.0.688-fabric.jar"
|
||||
side = "both"
|
||||
side = "client"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/nfn13YXA/versions/Jhw0fDTs/RoughlyEnoughItems-14.0.688-fabric.jar"
|
||||
|
@ -1,13 +1,13 @@
|
||||
name = "Sodium Extra"
|
||||
filename = "sodium-extra-0.5.3+mc1.20.2-build.114.jar"
|
||||
filename = "sodium-extra-0.5.4+mc1.20.4-build.116.jar"
|
||||
side = "client"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/PtjYWJkn/versions/e8Jw5Pey/sodium-extra-0.5.3%2Bmc1.20.2-build.114.jar"
|
||||
url = "https://cdn.modrinth.com/data/PtjYWJkn/versions/M0ndiav7/sodium-extra-0.5.4%2Bmc1.20.4-build.116.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "36f5fbe6b699600b648bdbb854c9f54d54fd9444"
|
||||
hash = "5cdad24baaac7c254e07205aef6052946f4a5246"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "PtjYWJkn"
|
||||
version = "e8Jw5Pey"
|
||||
version = "M0ndiav7"
|
||||
|
@ -1,13 +1,13 @@
|
||||
name = "Sodium"
|
||||
filename = "sodium-fabric-mc1.20.3-0.5.5.jar"
|
||||
filename = "sodium-fabric-0.5.7+mc1.20.3.jar"
|
||||
side = "client"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/AANobbMI/versions/InGKdfel/sodium-fabric-mc1.20.3-0.5.5.jar"
|
||||
url = "https://cdn.modrinth.com/data/AANobbMI/versions/Wzzjm5lQ/sodium-fabric-0.5.7%2Bmc1.20.3.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "999eb53c5761850e99d234812dd0f710640b79a5"
|
||||
hash = "29bb348941f10d9711764893ec1da0a46feaa2b7"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "AANobbMI"
|
||||
version = "InGKdfel"
|
||||
version = "Wzzjm5lQ"
|
||||
|
13
mods/terra.pw.toml
Normal file
13
mods/terra.pw.toml
Normal file
@ -0,0 +1,13 @@
|
||||
name = "Terra"
|
||||
filename = "Terra-fabric-6.4.3-BETA+ab60f14ff.jar"
|
||||
side = "server"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/FIlZB9L0/versions/EVe9wYaj/Terra-fabric-6.4.3-BETA%2Bab60f14ff.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "d42a9ec669c029c0bbe04a35eaefe9fae7151958"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "FIlZB9L0"
|
||||
version = "EVe9wYaj"
|
@ -1,13 +1,13 @@
|
||||
name = "Xaero's Minimap"
|
||||
filename = "Xaeros_Minimap_23.9.6_Fabric_1.20.4.jar"
|
||||
filename = "Xaeros_Minimap_23.9.7_Fabric_1.20.4.jar"
|
||||
side = "both"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/1bokaNcj/versions/PfhJ0nzQ/Xaeros_Minimap_23.9.6_Fabric_1.20.4.jar"
|
||||
url = "https://cdn.modrinth.com/data/1bokaNcj/versions/LLE04weG/Xaeros_Minimap_23.9.7_Fabric_1.20.4.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "7beae7f5f54c343bb18ff32d59631c6c02e0a000"
|
||||
hash = "a9eccc98e5df49bd0a9c893d16f03945d7a81edb"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "1bokaNcj"
|
||||
version = "PfhJ0nzQ"
|
||||
version = "LLE04weG"
|
||||
|
@ -1,13 +1,13 @@
|
||||
name = "Xaero's World Map"
|
||||
filename = "XaerosWorldMap_1.37.6_Fabric_1.20.4.jar"
|
||||
filename = "XaerosWorldMap_1.37.7_Fabric_1.20.4.jar"
|
||||
side = "both"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/NcUtCpym/versions/UXPdKH9b/XaerosWorldMap_1.37.6_Fabric_1.20.4.jar"
|
||||
url = "https://cdn.modrinth.com/data/NcUtCpym/versions/IwNGlfAn/XaerosWorldMap_1.37.7_Fabric_1.20.4.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "d08eb3b6e5c06deaebe5666e663a5836c5470e17"
|
||||
hash = "acb34b68dc00cded554cb3eb5525881f4c15a1d3"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "NcUtCpym"
|
||||
version = "UXPdKH9b"
|
||||
version = "IwNGlfAn"
|
||||
|
13
mods/your-reputation.pw.toml
Normal file
13
mods/your-reputation.pw.toml
Normal file
@ -0,0 +1,13 @@
|
||||
name = "Your Reputation"
|
||||
filename = "your-reputation-0.2.5+jade.1.20.jar"
|
||||
side = "both"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/MrLyhFlg/versions/Hy4mpcsh/your-reputation-0.2.5%2Bjade.1.20.jar"
|
||||
hash-format = "sha1"
|
||||
hash = "5842a38e6c67684101dca1df769abee9168d809c"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "MrLyhFlg"
|
||||
version = "Hy4mpcsh"
|
@ -1,6 +1,6 @@
|
||||
name = "Evan's Pack"
|
||||
author = "Evan Pratten"
|
||||
version = "1.20.4r2"
|
||||
version = "1.20.4r3"
|
||||
pack-format = "packwiz:1.1.0"
|
||||
|
||||
[index]
|
||||
|
98
scripts/list_orphans.py
Normal file
98
scripts/list_orphans.py
Normal file
@ -0,0 +1,98 @@
|
||||
import argparse
|
||||
import sys
|
||||
import logging
|
||||
import requests
|
||||
import json
|
||||
import tomllib
|
||||
from typing import List, Tuple, Dict, Union
|
||||
from pathlib import Path
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def main() -> int:
|
||||
# Handle program arguments
|
||||
ap = argparse.ArgumentParser()
|
||||
ap.add_argument("--dot", help="Output a graphviz dot file here", type=Path)
|
||||
ap.add_argument(
|
||||
"-v", "--verbose", help="Enable verbose logging", action="store_true"
|
||||
)
|
||||
args = ap.parse_args()
|
||||
|
||||
# Configure logging
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG if args.verbose else logging.INFO,
|
||||
format="%(levelname)s: %(message)s",
|
||||
)
|
||||
|
||||
# Get a list of all toml files in the mods dir
|
||||
mods_tomls = list((Path(__file__).parent.parent / "mods").glob("*.toml"))
|
||||
|
||||
# Look for update.modrinth.mod-id and update.modrinth.version
|
||||
mods = []
|
||||
for mod_toml in mods_tomls:
|
||||
with open(mod_toml, "rb") as f:
|
||||
mod = tomllib.load(f)
|
||||
if "update" in mod and "modrinth" in mod["update"]:
|
||||
mods.append(
|
||||
{
|
||||
"name": mod["name"],
|
||||
"mod_id": mod["update"]["modrinth"]["mod-id"],
|
||||
"version_id": mod["update"]["modrinth"]["version"],
|
||||
"dependencies": [],
|
||||
}
|
||||
)
|
||||
|
||||
# Build a map of dependencies
|
||||
# mod_dependencies: Dict[str, List[str]] = {}
|
||||
for mod in mods:
|
||||
# Read the version metadata
|
||||
version_metadata = requests.get(
|
||||
f"https://api.modrinth.com/v2/version/{mod['version_id']}"
|
||||
).json()
|
||||
|
||||
# Track the dependencies
|
||||
for dependency in version_metadata.get("dependencies", {}):
|
||||
if "project_id" in dependency:
|
||||
mod["dependencies"].append(
|
||||
{"name": None, "mod_id": dependency["project_id"]}
|
||||
)
|
||||
|
||||
# In-fill all the dependency names (that we know about)
|
||||
for mod in mods:
|
||||
for dependency in mod["dependencies"]:
|
||||
for mod_data in mods:
|
||||
if mod_data["mod_id"] == dependency["mod_id"]:
|
||||
dependency["name"] = mod_data["name"]
|
||||
break
|
||||
|
||||
# De-dupe dependencies
|
||||
for mod in mods:
|
||||
mod["dependencies"] = list({v['name']:v for v in mod["dependencies"]}.values())
|
||||
|
||||
# If graphviz output requested, write it
|
||||
if args.dot:
|
||||
with open(args.dot, "w") as f:
|
||||
f.write("digraph {\n")
|
||||
for mod in mods:
|
||||
f.write(f'"{mod["name"]}" [label="{mod["name"]}"];\n')
|
||||
for dependency in mod["dependencies"]:
|
||||
f.write(f'"{mod["name"]}" -> "{dependency["name"]}";\n')
|
||||
f.write("}\n")
|
||||
|
||||
# Build a map of all mods, and which other mods depend upon them
|
||||
mod_to_dependers: Dict[str, List[str]] = {name:[] for name in [mod["name"] for mod in mods]}
|
||||
for mod in mods:
|
||||
for dependency in mod["dependencies"]:
|
||||
if dependency["name"] not in mod_to_dependers:
|
||||
mod_to_dependers[dependency["name"]] = []
|
||||
mod_to_dependers[dependency["name"]].append(mod["name"])
|
||||
|
||||
print(json.dumps(mod_to_dependers, indent=4))
|
||||
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
@ -1,13 +1,13 @@
|
||||
name = "BSL Shaders"
|
||||
filename = "BSL_v8.2.07.1.zip"
|
||||
filename = "BSL_v8.2.08p1.zip"
|
||||
side = "client"
|
||||
|
||||
[download]
|
||||
url = "https://cdn.modrinth.com/data/Q1vvjJYV/versions/1aQAjQxR/BSL_v8.2.07.1.zip"
|
||||
url = "https://cdn.modrinth.com/data/Q1vvjJYV/versions/pLaDVdNk/BSL_v8.2.08p1.zip"
|
||||
hash-format = "sha1"
|
||||
hash = "c630cbff74a5f8e7b039c5f06988abe0a0047d94"
|
||||
hash = "672c86b967198f46b4bf78e3dc9756fcad518c9c"
|
||||
|
||||
[update]
|
||||
[update.modrinth]
|
||||
mod-id = "Q1vvjJYV"
|
||||
version = "1aQAjQxR"
|
||||
version = "pLaDVdNk"
|
||||
|
Loading…
x
Reference in New Issue
Block a user