8 print(
"please use this format:")
9 print(
"%s inputfile.xml [outputfile.json] ... menu file conversion" % sys.argv[0].rsplit(
'/')[-1])
10 print(
"%s inputfile.json ... json conformity check of any json file" % sys.argv[0].rsplit(
'/')[-1])
13 inputfile = sys.argv[1]
14 outputfile = sys.argv[2]
if len(sys.argv)>2
else None
16 from TrigConfIO.MenuXML2JSONConverter
import XML2JsonConverter
17 converter = XML2JsonConverter()
19 if inputfile.endswith(
".xml"):
20 converter.convertFile( inputfile, outputfile )
21 elif inputfile.endswith(
".json"):
22 converter.checkJsonConformity( inputfile )