blob: 50f6ef67c062e2563516bbcda79d35d0e673445d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/usr/bin/env node
var ArgumentParser = require("argparse").ArgumentParser;
var main = require("../lib/main");
var parser = new ArgumentParser({
add_help: true
});
parser.add_argument("docx-path", {
type: "str",
help: "Path to the .docx file to convert."
});
var outputGroup = parser.add_mutually_exclusive_group();
outputGroup.add_argument("output-path", {
type: "str",
nargs: "?",
help: "Output path for the generated document. Images will be stored inline in the output document. Output is written to stdout if not set."
});
outputGroup.add_argument("--output-dir", {
type: "str",
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", {
default: "html",
choices: ["html", "markdown"],
help: "Output format."
});
parser.add_argument("--style-map", {
type: "str",
help: "File containg a style map."
});
main(parser.parse_args());
|