Salome HOME
Use containers with yacsdecorator.
[modules/yacs.git] / src / py2yacs / yacsbuild.py
index 61aaaf6b721191ded137bac591c5e56d3b4c0568..92a3fdbb2ea880e960cb729c8ae3a296602917c8 100755 (executable)
@@ -26,10 +26,15 @@ if __name__ == '__main__':
   parser.add_argument("mainbloc",
         help='Name of the function containing the main bloc of the schema.')
   parser.add_argument("yacsfile", help='Path to the output yacs file.')
+  parser.add_argument("-c", "--containers",
+                      help="File of containers.",
+                      default=None)
   args = parser.parse_args()
   import yacsdecorator
   yacsdecorator.activateYacsMode()
+  if not args.containers is None :
+    yacsdecorator.loadContainers(args.containers)
   import yacstools
   fn = yacstools.getFunction(args.path, args.mainbloc)
   fn()
-  yacsdecorator.finalize(args.yacsfile)
+  yacsdecorator.export(args.yacsfile)