diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-07-09 08:09:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-09 08:09:14 +0200 |
commit | a5b2988a0105deb37c14eb62ed8638eb15789ec3 (patch) | |
tree | 9acdb587050eaeb5e042866229b30a02a1159805 | |
parent | fb4b73ff0af1aec2e58d5a105e8770c677d55f2a (diff) | |
parent | f05aa9cc012f1f69a899e0e606a36ef1093d160d (diff) |
Merge pull request #50291 from Calinou/improve-makerst-usability
Make makerst.py create folders automatically, print a message when done
-rwxr-xr-x | doc/tools/makerst.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 1c6055f8ca..87c79048d8 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -350,6 +350,9 @@ def main(): # type: () -> None pattern = re.compile(args.filter) + # Create the output folder recursively if it doesn't already exist. + os.makedirs(args.output, exist_ok=True) + for class_name, class_def in state.classes.items(): if args.filter and not pattern.search(class_def.filepath): continue @@ -358,6 +361,8 @@ def main(): # type: () -> None if not state.errored: print("No errors found.") + if not args.dry_run: + print("Wrote reStructuredText files for each class to: %s" % args.output) else: print("Errors were found in the class reference XML. Please check the messages above.") exit(1) |