Auto-generate environment_variables.rst from menu.json
Provide scripts to generate/update the satnogs-config menu.yml
, the satnogs-client docs/userguide.rst
and the proposed upcoming Station Configuration Schema based on a single source of truth for the variables accepted by satnogs-client.
The purpose of this script is to deprecate the current method of copy-pasting lists of variables between the repositories. It's purpose is not to auto-generate these files automatically, updating them should be remain a human-controlled operation. As mentioned previously auto-generating them would introduce release dependencies/blockers between the different components.
- Normalize the documentation markup (!594 (merged))
- Develop a custom parser (
contrib/create_menujson.py
) to read theenvironment_variables.rst
and write the data into a preliminaryconfig/menu.json
- Develop a script (
contrib/refresh-docs.py
) to generate theenvironment_variables.rst
from a givenconfig/menu.json
- Manually fix newlines in the documentation fields of the preliminary
config/menu.json
until the auto-generatedenvironment_variables.rst
matches the original input - Mark
environment_variables.rst
as auto-generated and only allow manual editing ofconfig/menu.json
in the future
The update of documentation requires the manual invocation of contrib/refresh-docs.py
now.
Edited by Fabian P. Schmidt