@markdown-viewer/documd 5.2.1 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,20 +25,26 @@ documd --version
25
25
  ## Usage
26
26
 
27
27
  ```bash
28
- documd <input> [--format <f>] [-o <output>] [options]
28
+ documd <input> [<output>] [--format <f>] [options]
29
29
  ```
30
30
 
31
+ The output file is the second positional argument (pandoc style). Its
32
+ extension selects the format — when the input extension is a known input
33
+ format and the output extension is a known output format, documd infers
34
+ everything; otherwise it reports the unknown format and asks you to set
35
+ `--format` instead of guessing.
36
+
31
37
  `--format` is inferred from the **output extension** when omitted:
32
38
 
33
- - `-o out.epub` → epub, `-o out.pdf` → pdf, `-o out.png` → png, …
34
- - no `-o`: markdown → html, diagram sources → svg, `--book` → epub
39
+ - `notes.md out.epub` → epub, `notes.md out.pdf` → pdf, `flow.puml out.png` → png, …
40
+ - no output: markdown → html, diagram sources → svg, `--book` → epub
35
41
 
36
42
  ## Markdown documents
37
43
 
38
44
  ```bash
39
45
  documd notes.md # notes.html
40
46
  documd notes.md --format epub # notes.epub
41
- documd notes.md -o report.pdf # PDF (inferred from the extension)
47
+ documd notes.md report.pdf # PDF (inferred from the extension)
42
48
  documd notes.md --format docx # notes.docx
43
49
  ```
44
50
 
@@ -46,7 +52,7 @@ documd notes.md --format docx # notes.docx
46
52
 
47
53
  ```bash
48
54
  documd flow.puml # flow.svg (PlantUML inferred)
49
- documd chart.mmd -o chart.png # Mermaid → PNG
55
+ documd chart.mmd chart.png # Mermaid → PNG
50
56
  documd flow.puml --format drawio # PlantUML → DrawIO XML
51
57
  ```
52
58
 
@@ -76,7 +82,6 @@ documd SUMMARY.md --book --format pdf # one page per chapter
76
82
 
77
83
  | Option | Description |
78
84
  |---|---|
79
- | `-o, --output <file>` | Output path |
80
85
  | `--format <f>` | html, epub, docx, pdf, svg, png, drawio |
81
86
  | `-b, --book` | Whole-book export (input: GitBook SUMMARY.md) |
82
87
  | `--diagram-type <t>` | Diagram renderer override |