diff options
author | 2017-08-10 00:28:46 +0200 | |
---|---|---|
committer | 2017-08-10 00:28:46 +0200 | |
commit | 477dbfbb5e308ddcfc8b16513fe2183f618d8a23 (patch) | |
tree | 9c73767fd9c4daa995b4117e5dc2592bcaa6e43f | |
parent | format strings in a saner way (diff) | |
download | javatoolkit-477dbfbb5e308ddcfc8b16513fe2183f618d8a23.tar.gz javatoolkit-477dbfbb5e308ddcfc8b16513fe2183f618d8a23.tar.bz2 javatoolkit-477dbfbb5e308ddcfc8b16513fe2183f618d8a23.zip |
convert usage to a multi line string
-rwxr-xr-x | src/py/xml-rewrite-2.py | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/py/xml-rewrite-2.py b/src/py/xml-rewrite-2.py index 46b4bfd..a6b88ee 100755 --- a/src/py/xml-rewrite-2.py +++ b/src/py/xml-rewrite-2.py @@ -204,21 +204,20 @@ class SaxRewriter(XMLGenerator, StreamRewriterBase): def main(): - usage = "Copyright 2004,2006,2007 Gentoo Foundation\n" - usage += "Distributed under the terms of the GNU General Public Lincense v2\n" - usage += "Please contact the Gentoo Java Team <java@gentoo.org> with problems.\n" - usage += "\n" - usage += "Usage:\n" - usage += " xml-rewrite.py [-f file] --delete [-g] -e tag [-e tag] -a attribute [-a attribute] [-i index]\n" - usage += " xml-rewrite.py [-f file] --change [-g] -e tag [-e tag] -a attribute -v value [-a attribute -v value] \\\n" - usage += " [--source-element tag] [--source-attribute attribute --source-value value] \\\n" - usage += " [--target-element tag] [--target-attribute attribute --target-value value] [-i index]\n" - usage += "Or:\n" - usage += " xml-rewrite.py [-f file] -g\n" - usage += "\n" - usage += "If the -f parameter is not utilized, the script will read and\n" - usage += "write to stdin and stdout respectively. The use of quotes on\n" - usage += "parameters will break the script.\n" + usage = """Copyright 2004, 2006, 2007, 2017 Gentoo Foundation +Distributed under the terms of the GNU General Public Lincense v2 +Please contact the Gentoo Java Team <java@gentoo.org> with problems. +Usage: + xml-rewrite.py [-f file] --delete [-g] -e tag [-e tag] -a attribute [-a attribute] [-i index] + xml-rewrite.py [-f file] --change [-g] -e tag [-e tag] -a attribute -v value [-a attribute -v value] + [--source-element tag] [--source-attribute attribute --source-value value] + [--target-element tag] [--target-attribute attribute --target-value value] [-i index] +Or: + xml-rewrite.py [-f file] -g + +If the -f parameter is not utilized, the script will read and +write to stdin and stdout respectively. The use of quotes on +parameters will break the script.""" def error(message): print("ERROR: " + message) |