CM2XML(1)

πŸ“¦
version 0.7.1 Β· 4 versions
, in debian bookworm, ubuntu noble

πŸ’– 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-link automatically, 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 with classes="<class>" from the document tree.
⚠️ warning: potentially dangerous; use with caution. (Multiple-use option.)
  • --strip-class=<class> β€” removes all classes="<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. default 10 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 (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