diff options
| author | Ryan <fauxpark@gmail.com> | 2022-02-22 02:47:44 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-21 15:47:44 +0000 |
| commit | f30f963a0b6ccaa151fe83dd8302fa1f6829086e (patch) | |
| tree | 12a91b56de63ad064de2cbbf68e79001f659d4b1 /lib | |
| parent | b1de11c27575f9956d2f7dfd6bf0240d630e3ae1 (diff) | |
| download | qmk_firmware-f30f963a0b6ccaa151fe83dd8302fa1f6829086e.tar.gz qmk_firmware-f30f963a0b6ccaa151fe83dd8302fa1f6829086e.zip | |
Internal docs generation updates (#16411)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/python/qmk/cli/generate/docs.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/python/qmk/cli/generate/docs.py b/lib/python/qmk/cli/generate/docs.py index 749336fea..74112d834 100644 --- a/lib/python/qmk/cli/generate/docs.py +++ b/lib/python/qmk/cli/generate/docs.py | |||
| @@ -7,7 +7,9 @@ from subprocess import DEVNULL | |||
| 7 | from milc import cli | 7 | from milc import cli |
| 8 | 8 | ||
| 9 | DOCS_PATH = Path('docs/') | 9 | DOCS_PATH = Path('docs/') |
| 10 | BUILD_PATH = Path('.build/docs/') | 10 | BUILD_PATH = Path('.build/') |
| 11 | BUILD_DOCS_PATH = BUILD_PATH / 'docs' | ||
| 12 | DOXYGEN_PATH = BUILD_PATH / 'doxygen' | ||
| 11 | 13 | ||
| 12 | 14 | ||
| 13 | @cli.subcommand('Build QMK documentation.', hidden=False if cli.config.user.developer else True) | 15 | @cli.subcommand('Build QMK documentation.', hidden=False if cli.config.user.developer else True) |
| @@ -18,10 +20,12 @@ def generate_docs(cli): | |||
| 18 | * [ ] Add a real build step... something static docs | 20 | * [ ] Add a real build step... something static docs |
| 19 | """ | 21 | """ |
| 20 | 22 | ||
| 21 | if BUILD_PATH.exists(): | 23 | if BUILD_DOCS_PATH.exists(): |
| 22 | shutil.rmtree(BUILD_PATH) | 24 | shutil.rmtree(BUILD_DOCS_PATH) |
| 25 | if DOXYGEN_PATH.exists(): | ||
| 26 | shutil.rmtree(DOXYGEN_PATH) | ||
| 23 | 27 | ||
| 24 | shutil.copytree(DOCS_PATH, BUILD_PATH) | 28 | shutil.copytree(DOCS_PATH, BUILD_DOCS_PATH) |
| 25 | 29 | ||
| 26 | # When not verbose we want to hide all output | 30 | # When not verbose we want to hide all output |
| 27 | args = { | 31 | args = { |
| @@ -34,6 +38,6 @@ def generate_docs(cli): | |||
| 34 | 38 | ||
| 35 | # Generate internal docs | 39 | # Generate internal docs |
| 36 | cli.run(['doxygen', 'Doxyfile'], **args) | 40 | cli.run(['doxygen', 'Doxyfile'], **args) |
| 37 | cli.run(['moxygen', '-q', '-a', '-g', '-o', BUILD_PATH / 'internals_%s.md', 'doxygen/xml'], **args) | 41 | cli.run(['moxygen', '-q', '-g', '-o', BUILD_DOCS_PATH / 'internals_%s.md', DOXYGEN_PATH / 'xml'], **args) |
| 38 | 42 | ||
| 39 | cli.log.info('Successfully generated internal docs to %s.', BUILD_PATH) | 43 | cli.log.info('Successfully generated internal docs to %s.', BUILD_DOCS_PATH) |
