changeset 468:cef55b4e6c21 bgo-commands-codegen

stonegentool first commit
author bgo-osimis
date Mon, 11 Feb 2019 16:01:19 +0100
parents 5055031f4a06
children 52549faf47ba
files Resources/CodeGeneration/stonegentool.py
diffstat 1 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Resources/CodeGeneration/stonegentool.py	Mon Feb 11 16:01:19 2019 +0100
@@ -0,0 +1,30 @@
+from __future__ import print_function
+import sys
+
+
+
+
+
+
+if __name__ == '__main__':
+  import argparse
+  parser = argparse.ArgumentParser(usage = """stonegentool.py [-h] [-o OUT_DIR] [-v] input_schemas
+       EXAMPLE: python command_gen.py -o "generated_files/" "mainSchema.json,App Specific Commands.json" """)
+  parser.add_argument("input_schemas", type=str,
+                      help = "one or more schema files, as a comma-separated list of paths")
+  parser.add_argument("-o", "--out_dir", type=str, default=".", 
+                      help = """path of the directory where the files 
+                                will be generated. Default is current
+                                working folder""")
+  parser.add_argument("-v", "--verbosity", action="count", default=0,
+                      help = """increase output verbosity (0 == errors 
+                                only, 1 == some verbosity, 2 == nerd
+                                mode""")
+
+  args = parser.parse_args()
+  input_schemas = args.input_schemas.split(",")
+  out_dir = args.out_dir
+
+  print("input schemas = " + str(input_schemas))
+  print("out dir = " + str(out_dir))
+