From 9a815593f405b0ab7132fd0e525dfd890d3da55c Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Sun, 3 Dec 2023 16:18:21 +0000 Subject: [PATCH] auto-generator: Add --all flag --- auxiliary/scripts/auto-generator.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/auxiliary/scripts/auto-generator.py b/auxiliary/scripts/auto-generator.py index 4f7eb057..1d2fc119 100755 --- a/auxiliary/scripts/auto-generator.py +++ b/auxiliary/scripts/auto-generator.py @@ -413,21 +413,23 @@ def main(args): if not (args.readme or args.library or args.bindings): raise ValueError("One of --readme, --bindings or --library must be specified") + if args.bindings: + generate_bindings(node_classes) if args.readme: generate_readme(node_classes) - if args.library: generate_node_library(node_classes) - if args.bindings: - generate_bindings(node_classes) - - if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument("-b", "--bindings", action="store_true") - parser.add_argument("-t", "--readme", action="store_true") - parser.add_argument("-l", "--library", action="store_true") + parser.add_argument("-b", "--bindings", help="Generate Python bindings", action="store_true") + parser.add_argument("-l", "--library", help="Generate node library", action="store_true") + parser.add_argument("-t", "--readme", help="Generate README", action="store_true") + parser.add_argument("-a", "--all", help="Generate all", action="store_true") args = parser.parse_args() + if args.all: + args.bindings = True + args.library = True + args.readme = True main(args)