docutils(1)
π NAME π
okay bestie, so docutils is the generic command line interface for the docutils package β¨ that's the whole vibe, that's the assignment π
π¦ SYNOPSIS π¦
docutils [options] [<source> [<destination>]]
πΈ DESCRIPTION πΈ
no cap, this thing converts documents into useful formats π like that's literally its whole job and it ate fr fr π
here's the tea on how it flows π« it reads from <source> β and if you don't hand it a source, bestie, it defaults to stdin π β and then it writes to <destination> β and if you don't give it one of those either, it defaults to stdout π so like, no args and it's still gonna pipe the goods straight through, iconic behavior tbh β¨
π§ quick heads up: if you want the detailed settings reference (like the full deep dive, iykyk), it's chillin' at https://docutils.sourceforge.io/docs/user/config.html π go look, it's giving very thorough π
π OPTIONS π
bestie this is the β¨main characterβ¨ section. every flag, every default, every little caveat, all of it. it's giving "wall of text" but honestly? iconic. grab a snack π
π General Docutils Options π
--output-path=<destination>,--output=<destination>β where the output goes. this one obsoletes the<destination>positional argument, so it's the glow-up version. Default: None (stdout).--title=<title>β set the document title as metadata.--generator,-gβ drops in a "Generated by Docutils" credit and link, so everyone knows who did it π--no-generatorβ no generator credit. we're being mysterious.--date,-dβ slaps the date at the end of the document (UTC).--time,-tβ time and date at the end (UTC).--no-datestampβ no datestamp of any kind. zero. nada.--root-prefix=<path>β base directory for absolute paths when you're reading from the local filesystem. Default"".--source-link,-sβ adds a "View document source" link.--source-url=<URL>β use<URL>for the source link. heads up, this one implies--source-linkautomatically.--no-source-linkβ no "View document source" link, periodt.--toc-entry-backlinksβ links from section headers back to TOC entries. (this is the default, bestie)--toc-top-backlinksβ links from section headers to the top of the TOC instead.--no-toc-backlinksβ kills the backlinks to the table of contents.--footnote-backlinksβ links from footnotes/citations to their references. (default!)--no-footnote-backlinksβ no backlinks from footnotes and citations.--section-numberingβ turns on section numbering by Docutils. (default)--no-section-numberingβ turns section numbering off.--strip-commentsβ removes comment elements from the document tree.--leave-commentsβ leaves comment elements right where they are. (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>β report system messages at or higher than<level>. your levels are:"info"or"1","warning"/"2"(default),"error"/"3","severe"/"4","none"/"5".--verbose,-vβ report all system messages. same as"--report=1".--quiet,-qβ report zero system messages. same as"--report=5".--halt=<level>β halt execution at system messages at or above<level>. levels work like--report. Default:4(severe).--strictβ halt at the slightest problem. same energy as"--halt=info". very dramatic, very valid.--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]>β specify the encoding and optionally the error handler for input text. Default:utf-8.--output-encoding=<name[:handler]>β specify the text encoding and optionally the error handler for output. Default:utf-8.--error-encoding=<name[:handler]>,-e <name[:handler]>β specify text encoding and optionally the error handler for error output. Default: system encoding.--language=<tag>,-l <tag>β specify the language (as a BCP 47 language tag). Default:en.--record-dependencies=<file>β write output file dependencies to<file>.--config=<file>β read configuration settings from<file>, if it exists.--version,-Vβ show this program's version number and exit. bye! π¦--help,-hβ show this help message and exit.
πΈ 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.--legacy-idsβ keeps identifiers backwards compatible. Default.--matching-idsβ explicit targets use identifiers matching the reference name.--validateβ validates the document tree after parsing. π--no-validationβ does not validate the document tree. (default)
π¦ reStructuredText Parser Options π¦
--pep-referencesβ recognizes standalone PEP references (like"PEP 258") and links them up. π--pep-base-url=<URL>β base URL for PEP references (default"https://peps.python.org/").--pep-file-url-template=<URL>β template for the PEP file part of the URL. (default"pep-%04d")--rfc-referencesβ recognizes standalone RFC references (like"RFC 822") and links them.--rfc-base-url=<URL>β base URL for RFC references (default"https://tools.ietf.org/html/").--tab-width=<width>β sets the number of spaces for tab expansion (default8).--trim-footnote-reference-spaceβ removes spaces before footnote references.--leave-footnote-reference-spaceβ leaves spaces before footnote references alone.--syntax-highlight=<format>β token name set for parsing code with Pygments: one of"long","short", or"none"(no parsing). Default is"long".--smart-quotes=<yes/no/alt>β changes straight quotation marks into typographic form: one of"yes","no","alt[ernative]"(default"no").--smartquotes-locales=<language:quotes[,language:quotes,...]>β the characters to use as "smart quotes" for<language>.--word-level-inline-markupβ inline markup recognized at word boundaries only (adjacent to punctuation or whitespace). force character-level inline markup recognition with""(that's backslash + space, bestie). Default.--character-level-inline-markupβ inline markup recognized anywhere, regardless of surrounding characters. backslash-escapes must be used to avoid unwanted markup recognition. useful for East Asian languages. Experimental. π
π Standalone Reader Options π
--no-doc-titleβ disables the promotion of a lone top-level section title to document title (and the chain reaction where the next section title gets promoted to document subtitle; that's 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/html5_polyglot/template.txt")--stylesheet=<URL[,URL,...]>β comma separated list of stylesheet URLs. this one overrides any previous--stylesheetand--stylesheet-pathsettings. it said what it said.--stylesheet-path=<file[,file,...]>β comma separated list of stylesheet paths. relative paths get 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:"minimal.css,plain.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/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>β specify the initial header level. does not affect document title & subtitle (see--no-doc-title). (default:2for"<h2>")--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=<style>β class value(s) assigned to all tables. defined styles:borderless,booktabs,align-left,align-center,align-right,colwidths-auto,colwidths-grid.--math-output=<format[option(s)]>β math output format (one of"MathML","HTML","MathJax", or"LaTeX") and option(s). (default:"MathML")--xml-declarationβ prepends an XML declaration.--no-xml-declarationβ omits the XML declaration (default).--cloak-email-addressesβ obfuscates email addresses to confuse harvesters while still keeping email links usable with standards-compliant browsers. sneaky but make it β¨classyβ¨
π«Ά HTML5 Writer Options π«Ά
--image-loading=<strategy>β suggests at which point images should be loaded:"embed","link"(default), or"lazy". the lazy girlies ate with this one π¦--section-self-linkβ appends a self-link to section headings.--no-section-self-linkβ does not append a self-link to section headings. (default)
π Docutils Application Options π
Reader, writer, and parser settings influence the available options. Example: use --help --writer=latex to see LaTeX writer options. iykyk π
--reader=<reader>β reader name (currently:"standalone").--parser=<parser>β parser name (currently:"rst").--writer=<writer>β writer name (currently:"html5").
and that's the whole page, bestie π you made it to the very bottom β truly main character behavior. this was the docutils(1) manual page, footer and all, and yes the footer in the source is just the little docutils(1) tag sitting there at the end of the version-and-date line like a signature. no cap, go forth and render some documents β¨π
π¦ where this page comes from
- ubuntu stonking: docutils-common 0.23+dfsg-2 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms