rst-buildhtml(1)
โจ NAME โจ
okay so bestie, meet rst-buildhtml(1) โ the absolute icon who turns a whole directory of reStructuredText files into HTML. no cap, she's giving batch-converter main character energy. ๐
๐ SYNOPSIS ๐
rst-buildhtml [options] [<directory> ...]
๐ฆ DESCRIPTION ๐ฆ
Generate .html from all reStructuredText files in each <directory> (default is the current directory). So like, you just point her at some folders, and she goes through every reST file and pops out HTML. Lowkey magic, highkey useful. โจ
๐ OPTIONS ๐
okay so this is the big one. She has options on options. Let's vibe check them all, bestie. ๐
๐ธ General Docutils Options ๐ธ
--output-path=<destination>,--output=<destination>โ Output destination name. Obsoletes the<destination>positional argument. Default:None(stdout). ๐--title=<title>โ Specify the document title as metadata. ๐--generator,-gโ Include a "Generated by Docutils" credit and link. ๐--no-generatorโ Do not include a generator credit. ๐ซ--date,-dโ Include the date at the end of the document (UTC). ๐--time,-tโ Include the time & date (UTC). โฐ--no-datestampโ Do not include a datestamp of any kind. ๐--root-prefix=<path>โ Base directory for absolute paths when reading from the local filesystem. Default"". ๐--source-link,-sโ Include a "View document source" link. ๐--source-url=<URL>โ Use<URL>for a source link; implies--source-link. ๐--no-source-linkโ Do not include a "View document source" link. ๐ซ--toc-entry-backlinksโ Link from section headers to TOC entries. (default) ๐--toc-top-backlinksโ Link from section headers to the top of the TOC. โฌ๏ธ--no-toc-backlinksโ Disable backlinks to the table of contents. โ--footnote-backlinksโ Link from footnotes/citations to references. (default) ๐--no-footnote-backlinksโ Disable backlinks from footnotes and citations. ๐ซ--section-numberingโ Enable section numbering by Docutils. (default) ๐ข--no-section-numberingโ Disable section numbering by Docutils. โ--strip-commentsโ Remove comment elements from the document tree. ๐งน--leave-commentsโ Leave comment elements in the document tree. (default) ๐ฌ--strip-elements-with-class=<class>โ Remove all elements withclasses="<class>"from the document tree. Warning: potentially dangerous; use with caution. (Multiple-use option.) โ ๏ธ--strip-class=<class>โ Remove 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>:"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 no system messages. (Same as"--report=5".) ๐คซ--halt=<level>โ Halt execution at system messages at or above<level>. Levels as in--report. Default:4(severe). ๐--strictโ Halt at the slightest problem. Same as"--halt=info". ๐ค--exit-status=<level>โ Enable a non-zero exit status for non-halting system messages at or above<level>. Default:5(disabled). ๐ช--debugโ Enable debug-level system messages and diagnostics. ๐--no-debugโ Disable debug output. (default) ๐ซ--warnings=<file>โ Send the output of system messages to<file>. ๐--tracebackโ Enable Python tracebacks when Docutils is halted. ๐--no-tracebackโ Disable Python tracebacks. (default) ๐ซ--input-encoding=<name[:handler]>โ Specify the encoding and optionally the error handler of 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 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. ๐--help,-hโ Show this help message and exit. ๐
๐ PEP Reader Option Defaults ๐
The --pep-references and --rfc-references options (for the reStructuredText parser) are on by default. So like, they're already slaying. ๐
๐ฆ Generic Parser Options ๐ฆ
--no-file-insertionโ Disable directives that insert the contents of an external file; replaced with a"warning"system message. ๐ซ--file-insertion-enabledโ Enable directives that insert the contents of an external file. (default) โ--no-rawโ Disable the"raw"directive; replaced with a"warning"system message. ๐ซ--raw-enabledโ Enable the"raw"directive. (default) โ--line-length-limit=<length>โ Maximal number of characters in an input line. Default10 000. ๐--legacy-idsโ Keep identifiers backwards compatible. Default. ๐ต--matching-idsโ Explicit targets use identifiers matching the reference name. ๐ฏ--validateโ Validate the document tree after parsing. โ--no-validationโ Do not validate the document tree. (default) ๐ซ
โจ reStructuredText Parser Options โจ
--pep-referencesโ Recognize and link to standalone PEP references (like"PEP 258"). ๐--pep-base-url=<URL>โ Base URL for PEP references (default"<https://peps.python.org/>"). ๐--pep-file-url-template=<URL>โ Template for PEP file part of URL. (default"pep-%04d"). ๐--rfc-referencesโ Recognize and link to standalone RFC references (like"RFC 822"). ๐--rfc-base-url=<URL>โ Base URL for RFC references (default"<https://tools.ietf.org/html/>"). ๐--tab-width=<width>โ Set number of spaces for tab expansion (default8). ๐--trim-footnote-reference-spaceโ Remove spaces before footnote references. โ๏ธ--leave-footnote-reference-spaceโ Leave spaces before footnote references. ๐ฌ--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>โ Change straight quotation marks to typographic form: one of"yes","no","alt[ernative]"(default"no"). ๐ฌ--smartquotes-locales=<language:quotes[,language:quotes,...]>โ 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`"\ "`(backslash + space). 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. ๐งช
๐ 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โ Embed the stylesheet(s) in the output HTML file. The stylesheet files must be accessible during processing. (default) ๐พ--link-stylesheetโ Link 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: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โ Remove extra vertical whitespace between items of"simple"bullet lists and enumerated lists. (default) ๐--no-compact-listsโ Disable compact simple bullet and enumerated lists. ๐ซ--compact-field-listsโ Remove extra vertical whitespace between items of simple field lists. (default) ๐--no-compact-field-listsโ Disable 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:"HTML math.css"). ๐งฎ--xml-declarationโ Prepend an XML declaration (default). ๐--no-xml-declarationโ Omit the XML declaration. ๐ซ--cloak-email-addressesโ Obfuscate email addresses to confuse harvesters while still keeping email links usable with standards-compliant browsers. ๐ต๏ธ
๐ HTML4 Writer Options ๐
--field-name-limit=<level>โ Specify the maximum width (in characters) for one-column field names. Longer field names will span an entire row of the table used to render the field list. Default is14characters. Use0for"no limit". ๐--option-limit=<level>โ Specify 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 is14characters. Use0for"no limit". ๐
๐ PEP/HTML Writer Options ๐
For the PEP/HTML writer, the default value for the --stylesheet-path option is "/usr/share/docutils/writers/pep_html/pep.css", and the default value for --template is "/usr/share/docutils/writers/pep_html/template.txt". See HTML Writer Options above. ๐
--python-home=<URL>โ Python's home URL. Default is"<https://www.python.org>". ๐--pep-home=<URL>โ Home URL prefix for PEPs. Default is"."(current directory). ๐
โจ Build-HTML Options โจ
okay bestie, we're in the build-HTML zone now ๐ these are the switches that control how rst-buildhtml finds your files, ignores your files, and spits out that sweet, sweet HTML. let's get into it ๐
--sources=<patterns>โ this one is the "what files are we even looking at?" queen ๐. It processes every file that matches any of the glob-style patterns you throw at it, and you separate multiple patterns with colons. Heads up: this option overwrites the default or config-file values. Default vibe:".rst:.txt".--ignore=<patterns>โ recursively ignore files that match any of the given glob-style patterns (separated by colons). You can use this more than once to add more patterns, so it's like a block list you keep adding to ๐ซ. no cap.--localโ do not scan subdirectories for files to process. it's giving "stay in your lane, only this folder" ๐ .--recurseโ recursively scan subdirectories for files to process. This is the default! so it's already the main character energy โจ.--prune=<directory>โ do not process files in<directory>(glob-style patterns, separated by colons). This option may be used more than once to add more patterns. Default:"//.hg://.bzr://.git://.svn://.venv://__pycache__". (Yes bestie, that's a lot of slashes, but that's literally what it says ๐.)--writer=<writer>โ Docutils writer, one of"html","html4","html5". Default:"html"(use Docutils' default HTML writer). So you pick your HTML flavor: classic, older, or newer ๐ฅ.--silentโ work silently (no progress messages). Independent of"--quiet". It's like a mute button but specifically for progress bars and stuff ๐คซ.--dry-runโ do not process files, show files that would be processed. It's a little preview, a vibe check before you commit ๐.
that's the whole vibe, bestie! catch you in the man page footer: rst-buildhtml(1) ๐โจ (version and date are chillin' there too, but you know we keep it cute). bye! ๐ซถ
๐ฆ 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