#!/usr/bin/env python3 """The contrib manager is used to help control the contrib scripts that are shipped with overviewer in Windows packages.""" import ast import os.path import sys scripts = { # keys are names, values are scripts "convertCyrillic": "cyrillic_convert.py", "playerInspect": "playerInspect.py", "testRender": "testRender.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 pngit.exe # > chmod +x pngit.exe # > ./pngit.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 |