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
|
Write the RTD files to disk and add them to git, then run sphinx-build to generate the docs. |
|
Output a parameter to file |
|
Read all the .yaml files in to dicts. |
|
This is just a steering routine to enable better control of the program |
|
Writes a passed string as a header, with an appropriate type of underscore depending on nesting level (e.g. heading -> subheading). |
|
Write the documentation out to rst files |
|
Writes a passed string to the output file. |