diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-02-07 18:55:24 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-07 18:55:24 +0000 |
| commit | 57eddaefd1961884cddbaf427459822ad8811aeb (patch) | |
| tree | 1693604dfbd460f861227915b9734a4b9ebeb3eb /scripts | |
| parent | e0b022e52d720758023bb0248ea0a17a4cbbb822 (diff) | |
Add scaffolding for markdown
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mammoth | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/mammoth b/scripts/mammoth index b6fa056..f4865fb 100644 --- a/scripts/mammoth +++ b/scripts/mammoth @@ -7,6 +7,7 @@ import os import shutil import mammoth +from mammoth import writers def main(): @@ -27,10 +28,11 @@ def main(): output_filename = "{0}.html".format(os.path.basename(args.path).rpartition(".")[0]) output_path = os.path.join(args.output_dir, output_filename) - result = mammoth.convert_to_html( + result = mammoth.convert( docx_fileobj, style_map=style_map, convert_image=convert_image, + output_format=args.output_format, ) for message in result.messages: sys.stderr.write(message.message) @@ -89,6 +91,7 @@ def _parse_args(): output_group.add_argument("output", nargs="?") output_group.add_argument("--output-dir", nargs="?") + parser.add_argument("--output-format", required=False, choices=writers.formats()) parser.add_argument("--style-map", required=False) return parser.parse_args() |
