1 |
commit: 477dbfbb5e308ddcfc8b16513fe2183f618d8a23 |
2 |
Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 9 22:28:46 2017 +0000 |
4 |
Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 9 22:28:46 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/javatoolkit.git/commit/?id=477dbfbb |
7 |
|
8 |
convert usage to a multi line string |
9 |
|
10 |
src/py/xml-rewrite-2.py | 29 ++++++++++++++--------------- |
11 |
1 file changed, 14 insertions(+), 15 deletions(-) |
12 |
|
13 |
diff --git a/src/py/xml-rewrite-2.py b/src/py/xml-rewrite-2.py |
14 |
index 46b4bfd..a6b88ee 100755 |
15 |
--- a/src/py/xml-rewrite-2.py |
16 |
+++ b/src/py/xml-rewrite-2.py |
17 |
@@ -204,21 +204,20 @@ class SaxRewriter(XMLGenerator, StreamRewriterBase): |
18 |
|
19 |
|
20 |
def main(): |
21 |
- usage = "Copyright 2004,2006,2007 Gentoo Foundation\n" |
22 |
- usage += "Distributed under the terms of the GNU General Public Lincense v2\n" |
23 |
- usage += "Please contact the Gentoo Java Team <java@g.o> with problems.\n" |
24 |
- usage += "\n" |
25 |
- usage += "Usage:\n" |
26 |
- usage += " xml-rewrite.py [-f file] --delete [-g] -e tag [-e tag] -a attribute [-a attribute] [-i index]\n" |
27 |
- usage += " xml-rewrite.py [-f file] --change [-g] -e tag [-e tag] -a attribute -v value [-a attribute -v value] \\\n" |
28 |
- usage += " [--source-element tag] [--source-attribute attribute --source-value value] \\\n" |
29 |
- usage += " [--target-element tag] [--target-attribute attribute --target-value value] [-i index]\n" |
30 |
- usage += "Or:\n" |
31 |
- usage += " xml-rewrite.py [-f file] -g\n" |
32 |
- usage += "\n" |
33 |
- usage += "If the -f parameter is not utilized, the script will read and\n" |
34 |
- usage += "write to stdin and stdout respectively. The use of quotes on\n" |
35 |
- usage += "parameters will break the script.\n" |
36 |
+ usage = """Copyright 2004, 2006, 2007, 2017 Gentoo Foundation |
37 |
+Distributed under the terms of the GNU General Public Lincense v2 |
38 |
+Please contact the Gentoo Java Team <java@g.o> with problems. |
39 |
+Usage: |
40 |
+ xml-rewrite.py [-f file] --delete [-g] -e tag [-e tag] -a attribute [-a attribute] [-i index] |
41 |
+ xml-rewrite.py [-f file] --change [-g] -e tag [-e tag] -a attribute -v value [-a attribute -v value] |
42 |
+ [--source-element tag] [--source-attribute attribute --source-value value] |
43 |
+ [--target-element tag] [--target-attribute attribute --target-value value] [-i index] |
44 |
+Or: |
45 |
+ xml-rewrite.py [-f file] -g |
46 |
+ |
47 |
+If the -f parameter is not utilized, the script will read and |
48 |
+write to stdin and stdout respectively. The use of quotes on |
49 |
+parameters will break the script.""" |
50 |
|
51 |
def error(message): |
52 |
print("ERROR: " + message) |