diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-02-04 18:53:02 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-02-04 18:53:02 +0000 |
| commit | 65244218366555756c068b1b8edb37515f6f4e9b (patch) | |
| tree | 57ea7166eaa35c4d3e4b86204d556c0348b5699e /lib/main.js | |
| parent | 21ab7c6d791e68e2c3e2884bc5c3ab2455f398d9 (diff) | |
Add CLI argument --output-format
Diffstat (limited to 'lib/main.js')
| -rw-r--r-- | lib/main.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/main.js b/lib/main.js index a9ca14d..4e79747 100644 --- a/lib/main.js +++ b/lib/main.js @@ -9,11 +9,13 @@ function main(argv) { var docxPath = argv["docx-path"]; var outputPath = argv["output-path"]; var outputDir = argv["output-dir"]; + var outputFormat = argv["output-format"]; var styleMapPath = argv["style-map"]; readStyleMap(styleMapPath).then(function(styleMap) { var options = { - styleMap: styleMap + styleMap: styleMap, + outputFormat: outputFormat }; if (outputDir) { @@ -34,7 +36,7 @@ function main(argv) { }); } - return mammoth.convertToHtml({path: docxPath}, options) + return mammoth.convert({path: docxPath}, options) .then(function(result) { var outputStream = outputPath ? fs.createWriteStream(outputPath) : process.stdout; |
