#!/usr/bin/env python # The contrib manager is used to help control the contribs script # that are shipped with overviewer in Windows packages import sys import os.path sys.path.append("overviewer_core") import nbt import ast scripts=dict( # keys are names, values are scripts benchmark = "benchmark.py", findSigns = "findSigns.py", validate = "validateRegionFile.py", playerInspect = "playerInspect.py" ) # you can symlink or hardlink contribManager.py to another name to have it # automatically find the right script to run. For example: # > ln -s contribManager.py validate.exe # > chmod +x validate.exe # > ./validate.exe -h # figure out what script to execute argv=os.path.basename(sys.argv[0]) if argv[-4:] == ".exe": argv=argv[0:-4] if argv[-3:] == ".py": argv=argv[0:-3] usage="""Usage: %s --list-contribs |