autogenerate_rtd_pages

Converts .yml format parameter descriptions to .rst files.

This script goes through the created yaml documentation and converts them to .rst files, then writes them to an output directory

RST files to the git repository. It then calls Sphinx to build the docs, in the documentation/html folder, and opens them in the browser to test.

Usage: autogenerate_rtd_pages.py [-h] [-outdir whatever]

param None Then the rst files are written to direcotry $Python/docs/rst/parameters:

param -h Print this documenation and quite:

param -outdir whatever then write the rst files to that directoryk:

Notes

The user is prevented (at least from the command line) from writing into the main sphinx directory, inorder to avoid overwriting the existing files

Functions

autogenerate_rtd_pages(output_folder)

Write the RTD files to disk and add them to git, then run sphinx-build to generate the docs.

output_parameter(parameter, output_file)

Output a parameter to file

read_yaml(input_folder)

Read all the .yaml files in to dicts.

steer(argv)

This is just a steering routine to enable better control of the program

write_header_by_level(output_file, string[, ...])

Writes a passed string as a header, with an appropriate type of underscore depending on nesting level (e.g. heading -> subheading).

write_rst(output_folder, dox_all, dox_structured)

Write the documentation out to rst files

write_str_indent(output_file, string[, ...])

Writes a passed string to the output file.