#!/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 import ast # incantation to be able to import overviewer_core if not hasattr(sys, "frozen"): sys.path.insert(0, os.path.abspath(os.path.join(os.path.split(__file__)[0], '.'))) from overviewer_core import nbt scripts=dict( # keys are names, values are scripts clearOldCache = "clearOldCache.py", convertCyrillic = "cyrillic_convert.py", findSigns = "findSigns.py", playerInspect = "playerInspect.py", rerenderBlocks = "rerenderBlocks.py", testRender = "testRender.py", validate = "validateRegionFile.py", pngit = "png-it.py", gallery = "gallery.py", regionTrimmer = "regionTrimmer.py", contributors = "contributors.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 |