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 with classes="<class>" from the document tree. ⚠️ Warning: potentially dangerous; use with caution. (Multiple-use option β€” you can stack it.)
  • --strip-class=<class> β€” remove all classes="<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. Default 10 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 (default 8).
  • --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 macros UR and MT for 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