6.49. kink/doc/render/sphinx/SPHINX_RENDER_TOOL

Launcheable module to render a kinkdoc document into a set of reStructuredText files for Sphinx document generator.

Usage

The command reads the kinkdoc JSON data from the standard input, converts it to a set of reStructuredText files for Sphinx, and writes them under the directory `Dir`.

Mod_options

• --anchor-prefix {Prefix} : Uses `Prefix` as the prefix of anchors in generated reST files. By default `kinkdoc-` is used.

• --help : Prints out the help and exits.

Generated files

The command outputs following files in the destination directory.

• index.rst: Blocks of the document level section, and a `toctree` directive.

• Other .rst files: Contents of second level sections and their descendants. Usually, a single .rst file corresponds to a single module.

Example:

• index.rst

• kink-STR.rst : for kink/STR module

• kink-NUM.rst : for kink/NUM module

• kink-container-FLAT_SET.rst : for kink/container/FLAT_SET module

• ...

Anchors

The tiles of sections of the third and deeper levels will have anchors for cross reference. Example:

reST files in the Sphinx document can refer to a section using :ref: role like:

Anchors are generated from the text of the title of the section, and the titles of the anscestors.

Usage example

6.49.1. SPHINX_RENDER_TOOL.main(Argv)

`main` is the launcher of the module.