Mercurial > hg > orthanc-stone
comparison Resources/CodeGeneration/stonegentool.py @ 468:cef55b4e6c21 bgo-commands-codegen
stonegentool first commit
author | bgo-osimis |
---|---|
date | Mon, 11 Feb 2019 16:01:19 +0100 |
parents | |
children | 52549faf47ba |
comparison
equal
deleted
inserted
replaced
466:5055031f4a06 | 468:cef55b4e6c21 |
---|---|
1 from __future__ import print_function | |
2 import sys | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 if __name__ == '__main__': | |
10 import argparse | |
11 parser = argparse.ArgumentParser(usage = """stonegentool.py [-h] [-o OUT_DIR] [-v] input_schemas | |
12 EXAMPLE: python command_gen.py -o "generated_files/" "mainSchema.json,App Specific Commands.json" """) | |
13 parser.add_argument("input_schemas", type=str, | |
14 help = "one or more schema files, as a comma-separated list of paths") | |
15 parser.add_argument("-o", "--out_dir", type=str, default=".", | |
16 help = """path of the directory where the files | |
17 will be generated. Default is current | |
18 working folder""") | |
19 parser.add_argument("-v", "--verbosity", action="count", default=0, | |
20 help = """increase output verbosity (0 == errors | |
21 only, 1 == some verbosity, 2 == nerd | |
22 mode""") | |
23 | |
24 args = parser.parse_args() | |
25 input_schemas = args.input_schemas.split(",") | |
26 out_dir = args.out_dir | |
27 | |
28 print("input schemas = " + str(input_schemas)) | |
29 print("out dir = " + str(out_dir)) | |
30 |