CM2HTML(1)
π NAME π
cm2html β okay so bestie, this little icon converts a CommonMark file into an HTML document. That's it, that's the whole job, and it does it flawlessly. Periodt.
β¨ SYNOPSIS β¨
cm2html [options] [<source> [<destination>]]
πΈ DESCRIPTION πΈ
It generates an HTML document from markdown sources, no cap. It reads from <source> β and if you don't give it one, default is stdin π«Ά β and it writes to <destination>, and if you don't give it one, default is stdout. Chef's kiss, honestly.
Want the full settings reference? It lives at https://docutils.sourceforge.io/docs/user/config.html β go be nosy, iykyk. πβ¨
π OPTIONS π
π General Docutils Options
--title=TITLEβ sets the document title as metadata. Name it, queen.--generator,-gβ includes a "Generated by Docutils" credit and link, so everyone knows who did it.--no-generatorβ does NOT include a generator credit. Humble era.--date,-dβ drops the date at the end of the document (UTC).--time,-tβ drops the time & date (UTC).--no-datestampβ no datestamp of any kind. Timeless.--source-link,-sβ includes a "View document source" link.--source-url=<URL>β uses<URL>for a source link; it also implies--source-link.--no-source-linkβ no "View document source" link. Sorry to that link.--toc-entry-backlinksβ links from section headers back to TOC entries. (default)--toc-top-backlinksβ links from section headers to the top of the TOC.--no-toc-backlinksβ disables backlinks to the table of contents.--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.--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>:"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".)--halt=<level>β halts execution at system messages at or above<level>. Levels as in--report. Default: 4 (severe).--strictβ halts at the slightest problem. Same as"--halt=info".--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.--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 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 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.--version,-Vβ shows this program's version number and exits. Bye bestie π--help,-hβ shows this help message and exits.
π§ Generic Parser Options
--no-file-insertionβ disables directives that insert the contents of an external file; gets 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 section title to document subtitle promotion; 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.
π HTML Writer Options
--template=<file>β template file. (UTF-8 encoded, default:"/usr/share/docutils/writers/html4css1/template.txt")--stylesheet=<URL[,URL,...]>β comma separated list of stylesheet URLs. Overrides previous--stylesheetand--stylesheet-pathsettings.--stylesheet-path=<file[,file,...]>β comma separated list of stylesheet paths. Relative paths are expanded if a matching file is found in the--stylesheet-dirs. With--link-stylesheet, the path is rewritten relative to the output HTML file. (default:"html4css1.css")--stylesheet-dirs=<dir[,dir,...]>β comma-separated list of directories where stylesheets are found. Used by--stylesheet-pathwhen expanding relative path arguments. (default:".,/usr/share/docutils/writers/html4css1,/usr/share/docutils/writers/html5_polyglot")--embed-stylesheetβ embeds the stylesheet(s) in the output HTML file. The stylesheet files must be accessible during processing. (default)--link-stylesheetβ links to the stylesheet(s) in the output HTML file.--initial-header-level=<level>β specifies the initial header level. Does not affect document title & subtitle (see--no-doc-title). (default:1for"<h1>")--footnote-references=<format>β format for footnote references: one of"superscript"or"brackets". (default:"brackets")--attribution=<format>β format for block quote attributions: one of"dash"(em-dash prefix),"parentheses"/"parens", or"none". (default:"dash")--compact-listsβ removes extra vertical whitespace between items of "simple" bullet lists and enumerated lists. (default)--no-compact-listsβ disables compact simple bullet and enumerated lists.--compact-field-listsβ removes extra vertical whitespace between items of simple field lists. (default)--no-compact-field-listsβ disables compact simple field lists.--table-style=TABLE_STYLEβ added to standard table classes. Defined styles:borderless,booktabs,align-left,align-center,alignright,colwidths-auto,colwidths-grid.--math-output=MATH_OUTPUTβ math output format (one of"MathML","HTML","MathJax", or"LaTeX") and option(s). (default:"HTML math.css")--xml-declarationβ prepends an XML declaration (default).--no-xml-declarationβ omits the XML declaration.--cloak-email-addressesβ obfuscates email addresses to confuse harvesters while still keeping email links usable with standardscompliant browsers. π΅οΈββοΈ
π HTML4 Writer Options
--field-name-limit=<level>β specifies the maximum width (in characters) for onecolumn field names. Longer field names will span an entire row of the table used to render the field list. Default is 14 characters. Use 0 for"no limit".--option-limit=<level>β specifies the maximum width (in characters) for options in option lists. Longer options will span an entire row of the table used to render the option list. Default is 14 characters. Use 0 for"no limit".
π«Ά AUTHOR π«Ά
Steve Genoud and Luca Barbato. Legends, fr fr. π
β COPYRIGHT β
Copyright (C) 2014 Steve Genoud and Luca Barbato.
and that's the whole page, bestie β¨ This one ships as part of the recommonmark Python package, specifically Debian 0.7.1+ds-5, dated February 2023 β so go forth, convert your CommonMark, and slay. πππ¦
π¦ 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