aboutsummaryrefslogtreecommitdiff
path: root/scripts/mammoth
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-12-28 12:06:26 +0000
committerMichael Williamson <mike@zwobble.org>2015-12-28 12:06:34 +0000
commit70a417ac4d54ca1e5f77b8ac696d0d9ba1e5cd6e (patch)
tree8bcefbcfc48a80d9506111398a53b4d97d95cca9 /scripts/mammoth
parent35911a6708d6e2baad4ff53560ed3dcbc6a34ab3 (diff)
Add help to CLI arguments
Diffstat (limited to 'scripts/mammoth')
-rw-r--r--scripts/mammoth27
1 files changed, 22 insertions, 5 deletions
diff --git a/scripts/mammoth b/scripts/mammoth
index b84d9a6..73a5b2b 100644
--- a/scripts/mammoth
+++ b/scripts/mammoth
@@ -85,14 +85,31 @@ class Output(object):
def _parse_args():
parser = argparse.ArgumentParser()
- parser.add_argument("path", metavar="docx-path")
+ parser.add_argument(
+ "path",
+ metavar="docx-path",
+ help="Path to the .docx file to convert.")
output_group = parser.add_mutually_exclusive_group()
- output_group.add_argument("output", nargs="?", metavar="output-path")
- output_group.add_argument("--output-dir", nargs="?")
+ output_group.add_argument(
+ "output",
+ nargs="?",
+ metavar="output-path",
+ help="Output path for the generated document. Images will be stored inline in the output document. Output is written to stdout if not set.")
+ output_group.add_argument(
+ "--output-dir",
+ nargs="?",
+ help="Output directory for generated HTML and images. Images will be stored in separate files. Mutually exclusive with output-path.")
- parser.add_argument("--output-format", required=False, choices=writers.formats())
- parser.add_argument("--style-map", required=False)
+ parser.add_argument(
+ "--output-format",
+ required=False,
+ choices=writers.formats(),
+ help="Output format.")
+ parser.add_argument(
+ "--style-map",
+ required=False,
+ help="File containg a style map.")
return parser.parse_args()