Minor updates / tweaks

This commit is contained in:
oitsjustjose 2025-09-26 14:07:03 -05:00
commit 2ca4783a6e
15 changed files with 35 additions and 264 deletions

View file

@ -0,0 +1,22 @@
{
"mods": [
"betterbiomeblend",
"BetterFps",
"BorderlessWindow",
"citresewn",
"create_train_perspective",
"dynamiclightsreforged",
"LegendaryTooltips",
"moreoverlays",
"NekosEnchantedBooks",
"oculus-flywheel-compat",
"oculus",
"raised-forge",
"rubidium",
"Ryoamiclights",
"TextAnimator",
"wi-zoom",
"extrasounds",
"Rrls"
]
}

View file

@ -0,0 +1,41 @@
"""
@author Jose Stovall | github.com/oitsjustjose
"""
import json
import os
import sys
from typing import List
THIS_DIR = "\\".join(os.path.realpath(__file__).split("\\")[:-1])
def __print(obj: any):
with open(os.path.join(THIS_DIR, "log.txt"), "a+", encoding="utf-8") as fh:
fh.write(f"{obj}\n")
print = __print
if len(sys.argv) != 2:
print("Missing 2nd parameter <FOLDER>")
sys.exit(1)
target_dir: str = sys.argv[1]
client_mods: List[str] = []
with open(os.path.join(THIS_DIR, "mods.json"), "r", encoding="utf-8") as fh:
data = json.loads(fh.read())
if "mods" not in data:
print('Client mod JSON missing "mods" Array')
sys.exit(1)
client_mods = data["mods"]
for file_name in os.listdir(target_dir):
for mod in client_mods:
if mod.lower() in file_name.lower():
os.unlink(os.path.join(target_dir, file_name))
break