diff --git a/scour/__init__.py b/scour/__init__.py index aca9dcf..51c0f32 100644 --- a/scour/__init__.py +++ b/scour/__init__.py @@ -16,4 +16,18 @@ # ############################################################################### -__version__ = u'0.35' + +from .version import __version__ + + +# public API +from .scour import scourString as scour_string +from .scour import scourXmlFile as scour_xml_file +from .scour import sanitizeOptions as options +from .scour import parse_args + +__all__ = ['scour_string', 'scour_xml_file', 'options', 'parse_args'] + + +# silence pyflakes +version = __version__ diff --git a/scour/__main__.py b/scour/__main__.py new file mode 100644 index 0000000..7981eb8 --- /dev/null +++ b/scour/__main__.py @@ -0,0 +1,3 @@ +from .scour import run + +run() diff --git a/scour/scour.py b/scour/scour.py index 23be0c5..3f15ad0 100644 --- a/scour/scour.py +++ b/scour/scour.py @@ -3564,6 +3564,7 @@ class HeaderedFormatter(optparse.IndentedHelpFormatter): # GZ: would prefer this to be in a function or class scope, but tests etc need # access to the defaults anyway _options_parser = optparse.OptionParser( + prog=APP, usage="%prog [INPUT.SVG [OUTPUT.SVG]] [OPTIONS]", description=("If the input/output files are not specified, stdin/stdout are used. " "If the input/output files are specified with a svgz extension, " diff --git a/scour/version.py b/scour/version.py new file mode 100644 index 0000000..1b29d33 --- /dev/null +++ b/scour/version.py @@ -0,0 +1 @@ +__version__ = u'0.35' diff --git a/setup.py b/setup.py index 5149e88..1ead091 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ Authors: - Tobias Oberstein (maintainer) """ -VERSIONFILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), "scour", "__init__.py") +VERSIONFILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), "scour", "version.py") verstrline = open(VERSIONFILE, "rt").read() VSRE = r"^__version__ = u['\"]([^'\"]*)['\"]" mo = re.search(VSRE, verstrline, re.M)