components/policy/tools/generate_extension_admx.py
def main():
  '''Main function, usage see top of file.'''
  parser = ArgumentParser(usage=__doc__)
  parser.add_argument(
      '--name',
      dest='extension_name',
      help='extension name (e.g. Managed Bookmarks)')
  parser.add_argument(
      '--id',
      dest='extension_id',
      help='extension id (e.g. gihmafigllmhbppdfjnfecimiohcljba)')
  parser.add_argument(
      '--schema',
      dest='schema_file',
      help='Input schema.json file for the extension',
      metavar='FILE')
  parser.add_argument(
      '--admx', dest='admx_file', help='Output ADMX file', metavar='FILE')
  parser.add_argument(
      '--adml', dest='adml_file', help='Output ADML file', metavar='FILE')
  args = parser.parse_args()

  if (not args.extension_name or not args.extension_id or
      not args.schema_file or not args.admx_file or not args.adml_file):
    parser.print_help()
    return 1

  ConvertJsonToAdmx(args.extension_name, args.extension_id, args.schema_file,
                    args.admx_file, args.adml_file)
  return 0
Main function, usage see top of file.
Main function, usage see top of file.
Main function usage see top of file .
def main():
  parser = ArgumentParser(usage=__doc__)
  parser.add_argument(
      '--name',
      dest='extension_name',
      help='extension name (e.g. Managed Bookmarks)')
  parser.add_argument(
      '--id',
      dest='extension_id',
      help='extension id (e.g. gihmafigllmhbppdfjnfecimiohcljba)')
  parser.add_argument(
      '--schema',
      dest='schema_file',
      help='Input schema.json file for the extension',
      metavar='FILE')
  parser.add_argument(
      '--admx', dest='admx_file', help='Output ADMX file', metavar='FILE')
  parser.add_argument(
      '--adml', dest='adml_file', help='Output ADML file', metavar='FILE')
  args = parser.parse_args()
  if (not args.extension_name or not args.extension_id or
      not args.schema_file or not args.admx_file or not args.adml_file):
    parser.print_help()
    return 1
  ConvertJsonToAdmx(args.extension_name, args.extension_id, args.schema_file,
                    args.admx_file, args.adml_file)
  return 0
def main ( ) : parser = ArgumentParser ( usage = __doc__ ) parser . add_argument ( '--name' , dest = 'extension_name' , help = 'extension name (e.g. Managed Bookmarks)' ) parser . add_argument ( '--id' , dest = 'extension_id' , help = 'extension id (e.g. gihmafigllmhbppdfjnfecimiohcljba)' ) parser . add_argument ( '--schema' , dest = 'schema_file' , help = 'Input schema.json file for the extension' , metavar = 'FILE' ) parser . add_argument ( '--admx' , dest = 'admx_file' , help = 'Output ADMX file' , metavar = 'FILE' ) parser . add_argument ( '--adml' , dest = 'adml_file' , help = 'Output ADML file' , metavar = 'FILE' ) args = parser . parse_args ( ) if ( not args . extension_name or not args . extension_id or not args . schema_file or not args . admx_file or not args . adml_file ) : parser . print_help ( ) return 1 ConvertJsonToAdmx ( args . extension_name , args . extension_id , args . schema_file , args . admx_file , args . adml_file ) return 0
Main function, usage see top of file.
Main function usage see top of file .
'''Main function, usage see top of file.'''