CM2XML(1)
π CM2XML(1) π
okay so bestie, welcome to the cm2xml page β it lives in the recommonmark Python package, and no, you're not lost, you're exactly where you need to be. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
cm2xml β turns a CommonMark file into an XML document. that's it. that's the whole job. slay.
π¦ SYNOPSIS π¦
cm2xml [options] [<source> [<destination>]]
πΈ DESCRIPTION πΈ
so like, this thing generates an XML document from markdown sources. it reads from <source> β and if you don't give it one, it just reads from stdin, no big deal β and it writes to <destination>, which defaults to stdout because of course it does.
and if you want the full detailed settings reference, it's literally right here, go look: https://docutils.sourceforge.io/docs/user/config.html
π OPTIONS π
General Docutils Options π
--title=TITLEβ sets the document title as metadata. name your doc, icon behaviour.--generator,-gβ adds a "Generated by Docutils" credit and link. give credit where credit is due bestie.--no-generatorβ do not include a generator credit.--date,-dβ slaps the date at the end of the document (UTC).--time,-tβ includes the time and date (UTC). timestamped and thriving.--no-datestampβ no datestamp of any kind. zero. none. invisible.--source-link,-sβ includes a "View document source" link.--source-url=<URL>β uses<URL>for the source link; this one implies--source-linkautomatically, sneaky but cute.--no-source-linkβ no "View document source" link. it's giving mystery.--toc-entry-backlinksβ links from section headers to TOC entries. (default)--toc-top-backlinksβ links from section headers to the top of the TOC instead.--no-toc-backlinksβ disables backlinks to the table of contents entirely.--footnote-backlinksβ links from footnotes/citations to references. (default)--no-footnote-backlinksβ disables backlinks from footnotes and citations.--section-numberingβ enables section numbering by Docutils. (default)--no-section-numberingβ disables section numbering by Docutils.--strip-commentsβ removes comment elements from the document tree. bye bestie π--leave-commentsβ leaves comment elements in the document tree. (default)--strip-elements-with-class=<class>β removes all elements withclasses="<class>"from the document tree.
β οΈ warning: potentially dangerous; use with caution. (Multiple-use option.)
--strip-class=<class>β removes allclasses="<class>"attributes from elements in the document tree.
β οΈ warning: potentially dangerous; use with caution. (Multiple-use option.)
--report=<level>,-r <level>β reports system messages at or higher than<level>. the levels are:"info"or"1","warning"/"2"(default),"error"/"3","severe"/"4","none"/"5".--verbose,-vβ reports all system messages. (same as"--report=1".)--quiet,-qβ reports no system messages. (same as"--report=5".) shhh π€«--halt=<level>β halts execution at system messages at or above<level>. levels work the same as in--report. default:4(severe).--strictβ halts at the slightest problem. same as"--halt=info". it's giving perfectionist.--exit-status=<level>β enables a non-zero exit status for non-halting system messages at or above<level>. default:5(disabled).--debugβ enables debug-level system messages and diagnostics. detective mode π--no-debugβ disables debug output. (default)--warnings=<file>β sends the output of system messages to<file>.--tracebackβ enables Python tracebacks when Docutils is halted.--no-tracebackβ disables Python tracebacks. (default)--input-encoding=<name[:handler]>,-i <name[:handler]>β specifies the encoding and optionally the error handler of input text. default:<auto-detect>:strict.--input-encoding-error-handler=INPUT_ENCODING_ERROR_HANDLERβ specifies the error handler for undecodable characters. choices:"strict"(default),"ignore", and"replace".--output-encoding=<name[:handler]>,-o <name[:handler]>β specifies the text encoding and optionally the error handler for output. default:utf-8:strict.--output-encoding-error-handler=OUTPUT_ENCODING_ERROR_HANDLERβ specifies the error handler for unencodable output characters:"strict"(default),"ignore","replace","xmlcharrefreplace","backslashreplace".--error-encoding=<name[:handler]>,-e <name[:handler]>β specifies text encoding and optionally error handler for error output. default text encoding: system encoding. default error handler:backslashreplace.--error-encoding-error-handler=ERROR_ENCODING_ERROR_HANDLERβ specifies the error handler for unencodable characters in error output. default:backslashreplace.--language=<name>,-l <name>β specifies the language (as a BCP 47 language tag). default:en.--record-dependencies=<file>β writes output file dependencies to<file>.--config=<file>β reads configuration settings from<file>, if it exists. (if it doesn't, no drama.)--version,-Vβ shows this program's version number and exits.--help,-hβ shows this help message and exits. the classic.
Generic Parser Options π
--no-file-insertionβ disables directives that insert the contents of an external file; they get replaced with a"warning"system message.--file-insertion-enabledβ enables directives that insert the contents of an external file. (default)--no-rawβ disables the"raw"directive; replaced with a"warning"system message.--raw-enabledβ enables the"raw"directive. (default)--line-length-limit=<length>β maximal number of characters in an input line. default10 000.
Standalone Reader Options π
--no-doc-titleβ disables the promotion of a lone top-level section title to document title (and the subsequent promotion of a section title to document subtitle; this whole thing is enabled by default).--no-doc-infoβ disables the bibliographic field list transform (enabled by default).--section-subtitlesβ activates the promotion of lone subsection titles to section subtitles (disabled by default).--no-section-subtitlesβ deactivates the promotion of lone subsection titles.
Docutils XML Writer Options π§
--newlinesβ generates XML with newlines before and after tags.--indentsβ generates XML with indents and newlines. aesthetic β¨--no-xml-declarationβ omits the XML declaration.
β οΈ use with caution.
--no-doctypeβ omits the DOCTYPE declaration.
π AUTHOR π
Steve Genoud and Luca Barbato
π COPYRIGHT π
Copyright (C) 2014 Steve Genoud and Luca Barbato
and that's the whole page bestie, you ate it up fr fr π this one's from recommonmark (Debian 0.7.1+ds-5), dated February 2023 β CM2XML(1), periodt π
π¦ where this page comes from
- debian bookworm: recommonmark-scripts 0.7.1+ds-5 Β· MIT
- ubuntu noble: recommonmark-scripts 0.7.1+ds-5 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms