Created
February 24, 2025 17:29
-
-
Save maicol07/4b8b62338e6fd4e97a2a2ac832decb7d to your computer and use it in GitHub Desktop.
Simple Python script to update loaded JSON mods for the Dragon Ball Sparking Zero Mod Loader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
CONFIG = { | |
'ignored': ['vortex.deployment.dragonballsparkingzero-json.json'] | |
} | |
# Get current script path | |
path = os.path.dirname(os.path.realpath(__file__)) | |
# Get all JSON files in the current directory | |
files = [f for f in os.listdir(path) if f.endswith('.json') and f not in CONFIG['ignored']] | |
obj = {'Default': [f.removesuffix(".json") for f in files]} | |
# Write to JsonFiles.json in the script directory | |
with open(os.path.join(path, 'JsonFiles.json'), 'w') as f: | |
f.write(str(obj)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment