Documentation
¶
Overview ¶
Command md2 converts markdown files to other formats (currently PDF).
Usage:
md2 [-o output] [-f format] input.md [input2.md ...]
With more than one input file, they are concatenated in the order given into a single document before conversion. Each file's relative image references are resolved against its own directory.
If -o is omitted, the output filename is the (first) input with its extension replaced by the format. If -f is omitted, the format is inferred from the output extension, defaulting to pdf.
With -stdout the converted result is written to standard output instead of a file (single format only); pass -o as well to also write the file.
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
cli
Package cli implements md2's command-line orchestration: flag parsing, input merging, and dispatching to the registered converters.
|
Package cli implements md2's command-line orchestration: flag parsing, input merging, and dispatching to the registered converters. |
|
consent
Package consent implements the interactive policy used by the PDF browser fallback to decide whether it may download a browser when none is installed.
|
Package consent implements the interactive policy used by the PDF browser fallback to decide whether it may download a browser when none is installed. |
|
converter
Package converter defines the conversion interface and a registry of available output formats.
|
Package converter defines the conversion interface and a registry of available output formats. |
|
converter/chrome
Package chrome renders markdown to PDF by printing a styled HTML document with a headless Chrome/Chromium browser.
|
Package chrome renders markdown to PDF by printing a styled HTML document with a headless Chrome/Chromium browser. |
|
converter/html
Package html renders markdown to a complete, styled HTML document.
|
Package html renders markdown to a complete, styled HTML document. |
|
converter/pdf
Package pdf renders markdown to PDF.
|
Package pdf renders markdown to PDF. |
|
converter/text
Package text renders markdown to readable plain text, stripping markup while preserving structure (headings, lists, code, tables).
|
Package text renders markdown to readable plain text, stripping markup while preserving structure (headings, lists, code, tables). |
|
css
Package css loads a user-supplied stylesheet, inlining any local @import targets it references.
|
Package css loads a user-supplied stylesheet, inlining any local @import targets it references. |
|
merge
Package merge concatenates multiple markdown files, in order, into a single source document.
|
Package merge concatenates multiple markdown files, in order, into a single source document. |
|
urlref
Package urlref classifies markdown/HTML reference strings (image and link destinations) as local paths or URLs.
|
Package urlref classifies markdown/HTML reference strings (image and link destinations) as local paths or URLs. |
Click to show internal directories.
Click to hide internal directories.