rst2man(1)
π Name π
okay bestie, meet rst2man β the absolute icon who generates unix manpages from reStructured text. no cap, she takes your .rst and hands you back real troff. π
πΈ Synopsis πΈ
rst2man [options] [<source> [<destination>]]
π Description π
So like, rst2man generates Unix manual (troff) documents from standalone reStructuredText sources β the whole lore is at https://docutils.sourceforge.io/docs/user/manpage.html if you wanna deep dive. π¦
She reads from <source> (and if you don't give her one, default is stdin, she'll just vibe with whatever you pipe in) and writes to <destination> (default is stdout, so she'll scream it right into your terminal). β¨
There's a detailed settings reference at https://docutils.sourceforge.io/docs/user/config.html β highly recommend, it's giving encyclopedia but make it cute.
β¨ Options β¨
π General Docutils Options
--output-path=<destination>,--output=<destination>β the output destination name. this one obsoletes the<destination>positional argument, she's got main character energy like that. Default: None (stdout).--title=<title>β set the document title as metadata. giving your doc a lil name tag. π·οΈ--generator,-gβ include a "Generated by Docutils" credit and link. always tag your collaborators, bestie.--no-generatorβ no generator credit. she's mysterious. π--date,-dβ include the date at the end of the document (UTC).--time,-tβ include the time & date (UTC). both. timestamped. iconic.--no-datestampβ no datestamp of any kind, not even a lil one.--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; this 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. bye girl π--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 β you can stack it.)--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>, where<level>is one of:"info"or"1","warning"/"2"(default),"error"/"3","severe"/"4","none"/"5". pick your drama threshold. ποΈ--verbose,-vβ report all system messages. (Same as--report=1.) she tells you everything, fr fr.--quiet,-qβ report no system messages. (Same as--report=5.) silence is golden π--halt=<level>β halt execution at system messages at or above<level>. Levels work like--report. Default: 4 (severe). she's drawing a line.--strictβ halt at the slightest problem. Same as--halt=info. zero tolerance, we love a queen with standards.--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. detective mode π--no-debugβ disable debug output. (default)--warnings=<file>β send the output of system messages to<file>.--tracebackβ enable Python tracebacks when Docutils is halted. the full receipts. π--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. glow up check β¨--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 the PEP file part of the 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. π§ͺ
π Standalone Reader Options
--no-doc-titleβ disable the promotion of a lone top-level section title to document title (and the subsequent promotion of a section title to document subtitle; that whole thing is enabled by default).--no-doc-infoβ disable the bibliographic field list transform (enabled by default).--section-subtitlesβ activate the promotion of lone subsection titles to section subtitles (disabled by default).--no-section-subtitlesβ deactivate the promotion of lone subsection titles.
π Manpage Writer Options
--text-referencesβ write references in plain text form. (default)--macro-referencesβ use man macrosURandMTfor references.
and that's the whole page, bestie π this was the rst2man(1) glow-up, living under the text processing corner of your manual, and that rst2man(1) stamped on the bottom is just the footer saying hi. go make some manpages, you ate. πβ¨
π¦ 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