diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-12-08 08:38:34 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-12-08 12:12:16 +0100 |
commit | f3972822d254ad20b8e9582f89fe8e30ce931f5c (patch) | |
tree | 8fcb8aba6b46a6c3308f5721bbc929f0e1c32e72 /tools | |
parent | 8cbfe9aa6f46483968b8273aa45deaad12bffbfd (diff) |
Documentation: Generate the examples directly into the build directory
Pick-to: 6.2
Change-Id: If395979b5a1efa869b3c1c7cb12b53bd1e8f1f7c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/example_gallery/main.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/example_gallery/main.py b/tools/example_gallery/main.py index d6e6468bd..2cecab6fb 100644 --- a/tools/example_gallery/main.py +++ b/tools/example_gallery/main.py @@ -204,9 +204,13 @@ if __name__ == "__main__": gallery = "" parser = ArgumentParser(description=__doc__, formatter_class=RawTextHelpFormatter) + TARGET_HELP = f"Directory into which to generate RST files (default: {str(EXAMPLES_DOC)})" + parser.add_argument("--target", "-t", action="store", dest="target_dir", help=TARGET_HELP) parser.add_argument("--quiet", "-q", action="store_true", help="Quiet") options = parser.parse_args() opt_quiet = options.quiet + if options.target_dir: + EXAMPLES_DOC = Path(options.target_dir) # This main loop will be in charge of: # * Getting all the .pyproject files, |