1.1 --- a/moinconvert Tue Nov 27 21:12:40 2018 +0100
1.2 +++ b/moinconvert Tue Nov 27 21:13:04 2018 +0100
1.3 @@ -78,6 +78,10 @@
1.4 dirname, progname = split(sys.argv[0])
1.5 args = sys.argv[1:]
1.6
1.7 + if "--help" in args:
1.8 + show_help(progname)
1.9 + sys.exit(0)
1.10 +
1.11 # Option values.
1.12
1.13 l = filenames = []
1.14 @@ -307,6 +311,53 @@
1.15 if theme:
1.16 theme.install_resources()
1.17
1.18 +def show_help(progname):
1.19 +
1.20 + "Show the help text."
1.21 +
1.22 + print >>sys.stderr, help_text % progname
1.23 +
1.24 +help_text = """\
1.25 +Usage: %s [ <options> ] ( --all | <filename>... )
1.26 +
1.27 +Input options:
1.28 +
1.29 +--all Detect all document files in the specified input directory
1.30 +--input-dir Indicate an input directory containing document files
1.31 +--input-dir-type Indicate the type of input directory involved
1.32 + (default: directory)
1.33 +--input-encoding Indicate the character encoding used in document files
1.34 +--input-page-sep Indicate the separator used in filenames to encode
1.35 + hierarchical relationships (subpages and descendant pages)
1.36 +--pagename Indicate the page name corresponding to an indicated
1.37 + filename, with each successive instance of this option
1.38 + corresponding to each successive filename instance
1.39 +
1.40 +Output options:
1.41 +
1.42 +--format Indicate the format to be used for serialised documents
1.43 + (default: html)
1.44 +--fragment Indicates that an output fragment, not an entire document,
1.45 + is to be generated, skipping any theming activities
1.46 +--output-dir Indicate an output directory to contain serialised document
1.47 + files
1.48 +--output-encoding Indicate the character encoding used in serialised document
1.49 + files
1.50 +--theme Indicate a theme for serialised documents, typically
1.51 + requiring an output directory to be useful
1.52 +--tree Produce a document tree representation on standard output
1.53 + instead of generating output files
1.54 +
1.55 +Configuration options:
1.56 +
1.57 +--macros Perform macro evaluation/expansion before serialising
1.58 + documents
1.59 +--mapping Indicate a name and corresponding URL to be used to
1.60 + translate interwiki links
1.61 +--root Indicate the root page name to be used
1.62 + (default: FrontPage)
1.63 +"""
1.64 +
1.65 if __name__ == "__main__":
1.66 main()
1.67