summaryrefslogtreecommitdiff
path: root/README.html
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir@cohens.org.il>2018-02-27 19:47:27 +0200
committerTzafrir Cohen <tzafrir@cohens.org.il>2018-02-27 19:47:27 +0200
commitf393b7f9924a028955408b97deb1f812f3390619 (patch)
tree5e853226e45338c5cb1e1503373f35cc80094f0b /README.html
parent4d16eec8207908d94df26511a8a617c8f7cf7234 (diff)
Generate the "README"-s
Diffstat (limited to 'README.html')
-rw-r--r--README.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/README.html b/README.html
new file mode 100644
index 0000000..fcdb5a3
--- /dev/null
+++ b/README.html
@@ -0,0 +1,37 @@
+<p>usage: argparse-html.py [-h] [-a ARG_A] [-b PARAM_B] [-v] [-d] [-c]
+ [--html-usage] [--html-usage-raw]
+
+</p><p>This script demonstrates how to automatically convert argparse
+ output to HTML. See also the class HTMLFormatter.
+</p>
+<p> It's a hack. It does not produce a very clean HTML (there's an
+ extra '</ul>, for instance). But it's good enough for me. An empty
+ (or spaces-only) line is considered as a paragraph separator.
+</p>
+<p> I needed to produce HTML as a single line and thus this is the
+ default output. This is not part of the class and can be easily
+ changed in the wrapper function html_usage().</p></ul>
+<p>optional arguments</p>
+<ul>
+<li> -h, --help show this help message and exit
+</li><li> -a ARG_A, --arg-a ARG_A
+ Set value of A. Default: 1.1.
+</li><li> -b PARAM_B, --param-b PARAM_B
+ Set value of B. Default: 2.
+</li><li> -v, --verbose Be verbose
+</li>
+</ul>
+<p>For Interactive Use</p>
+<ul>
+<li> -d, --no-act Do nothing. Just print what is to be run
+</li><li> -c, --config Do nothing. Just show configuration
+</li><li> --html-usage Do nothing. Format help as HTML (a single line)
+</li><li> --html-usage-raw If html-usage: don't squash HTML to a single line
+</li>
+</ul><p>Note that we use RawTextHelpFormatter as the parser, rather than
+ HelpFormatter itself. Otherwise splitting to paragarphs with empty
+ lines won't show up in the standard --help output.
+</p>
+<p> If you have no problem with that, you can remove the formatter_class
+ parameter above.</p>
+