This commit is contained in:
Eduard Braun 2017-05-18 20:38:46 +00:00 committed by GitHub
commit bbc3e648e4
5 changed files with 21 additions and 2 deletions

View file

@ -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__

3
scour/__main__.py Normal file
View file

@ -0,0 +1,3 @@
from .scour import run
run()

View file

@ -3647,6 +3647,7 @@ class HeaderedFormatter(optparse.IndentedHelpFormatter):
# GZ: would prefer this to be in a function or class scope, but tests etc need # GZ: would prefer this to be in a function or class scope, but tests etc need
# access to the defaults anyway # access to the defaults anyway
_options_parser = optparse.OptionParser( _options_parser = optparse.OptionParser(
prog=APP,
usage="%prog [INPUT.SVG [OUTPUT.SVG]] [OPTIONS]", usage="%prog [INPUT.SVG [OUTPUT.SVG]] [OPTIONS]",
description=("If the input/output files are not specified, stdin/stdout are used. " description=("If the input/output files are not specified, stdin/stdout are used. "
"If the input/output files are specified with a svgz extension, " "If the input/output files are specified with a svgz extension, "

1
scour/version.py Normal file
View file

@ -0,0 +1 @@
__version__ = u'0.35'

View file

@ -33,7 +33,7 @@ Authors:
- Tobias Oberstein (maintainer) - 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() verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = u['\"]([^'\"]*)['\"]" VSRE = r"^__version__ = u['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M) mo = re.search(VSRE, verstrline, re.M)