rstpep2html(1)
π rstpep2html(1) π
okay bestie, so this is the page for rstpep2html, and it lives in the text processing section of the manual (section 1, obvi). it's giving "turn my PEP into a webpage" energy and honestly? iconic. let's get into it π
β¨ NAME β¨
rstpep2html β convert reST Python Enhancement Proposals to HTML π¦
β¨ SYNOPSIS β¨
rstpep2html [options] [<source> [<destination>]]
β¨ DESCRIPTION β¨
so like, the whole vibe here is: it generates (X)HTML from reStructuredText-format PEP files. that's it, that's the job. πΈ
it reads from <source> β and if you don't hand it a source, the default is stdin β and it writes to <destination> β and if you don't hand it a destination, the default is stdout. no cap. so you can absolutely just pipe stuff through it like a little diva and it'll behave. π
and if you want the full lore, the detailed settings reference is sitting right here:
https://docutils.sourceforge.io/docs/user/config.html
ngl bestie, go read that settings reference β it's where all the actual config details live, and this page is just the doorway πͺβ¨
to be continuedβ¦ part 2 incoming, don't go anywhere π«Ά
β¨ OPTIONS β¨
Okay bestie, this is the control panel. Every flag, every default, every warning β itβs all here. Periodt. π
πΈ General Docutils Options
--output-path=<destination>,--output=<destination>β Output destination name. This 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.
π 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.
π PEP Reader Option Defaults
Heads up, bestie: the --pep-references and --rfc-references options (for the reStructuredText parser) are on by default. π
π 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).
And thatβs the whole options saga, bestie! π This was rstpep2html(1) β source/version and date are chillinβ in the footer, you already know the vibe. Stay iconic, keep your encoding valid, and donβt let the harvesters get your email. Mwah! π
β¨
π¦ 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