def _DoMain(argv):
  parser = argparse.ArgumentParser()
  parser.add_argument("--out", help="Path for java output.")
  parser.add_argument("--srcjar", help="Path for srcjar output.")
  options = parser.parse_args(argv)
  if not options.out and not options.srcjar:
    parser.print_help()
    sys.exit(-1)

  values = {}
  values['GOOGLE_API_KEY'] = google_api_keys.GetAPIKey()
  values['GOOGLE_API_KEY_PHYSICAL_WEB_TEST'] = (google_api_keys.
      GetAPIKeyPhysicalWebTest())
  values['GOOGLE_CLIENT_ID_MAIN'] = google_api_keys.GetClientID('MAIN')
  values['GOOGLE_CLIENT_SECRET_MAIN'] = google_api_keys.GetClientSecret('MAIN')
  values['GOOGLE_CLIENT_ID_CLOUD_PRINT'] = google_api_keys.GetClientID(
      'CLOUD_PRINT')
  values['GOOGLE_CLIENT_SECRET_CLOUD_PRINT'] = google_api_keys.GetClientSecret(
      'CLOUD_PRINT')
  values['GOOGLE_CLIENT_ID_REMOTING'] = google_api_keys.GetClientID('REMOTING')
  values['GOOGLE_CLIENT_SECRET_REMOTING'] = google_api_keys.GetClientSecret(
      'REMOTING')
  values['GOOGLE_CLIENT_ID_REMOTING_HOST'] = google_api_keys.GetClientID(
      'REMOTING_HOST')
  values['GOOGLE_CLIENT_SECRET_REMOTING_HOST'] = (google_api_keys.
      GetClientSecret('REMOTING_HOST'))
  values['GOOGLE_CLIENT_ID_REMOTING_IDENTITY_API'] = (google_api_keys.
      GetClientID('REMOTING_IDENTITY_API'))

  if options.out:
    _DoWriteJavaOutput(options.out, values)
  if options.srcjar:
    _DoWriteJarOutput(options.srcjar, values)
Example #2
0
def _DoMain(argv):
    parser = argparse.ArgumentParser()
    parser.add_argument("--out", help="Path for java output.")
    parser.add_argument("--srcjar", help="Path for srcjar output.")
    options = parser.parse_args(argv)
    if not options.out and not options.srcjar:
        parser.print_help()
        sys.exit(-1)

    values = {}
    values['GOOGLE_API_KEY'] = google_api_keys.GetAPIKey()
    values['GOOGLE_API_KEY_ANDROID_NON_STABLE'] = (
        google_api_keys.GetAPIKeyAndroidNonStable())
    values['GOOGLE_CLIENT_ID_MAIN'] = google_api_keys.GetClientID('MAIN')
    values['GOOGLE_CLIENT_SECRET_MAIN'] = google_api_keys.GetClientSecret(
        'MAIN')
    values['GOOGLE_CLIENT_ID_REMOTING'] = google_api_keys.GetClientID(
        'REMOTING')
    values['GOOGLE_CLIENT_SECRET_REMOTING'] = google_api_keys.GetClientSecret(
        'REMOTING')
    values['GOOGLE_CLIENT_ID_REMOTING_HOST'] = google_api_keys.GetClientID(
        'REMOTING_HOST')
    values['GOOGLE_CLIENT_SECRET_REMOTING_HOST'] = (
        google_api_keys.GetClientSecret('REMOTING_HOST'))
    values['GOOGLE_CLIENT_ID_REMOTING_IDENTITY_API'] = (
        google_api_keys.GetClientID('REMOTING_IDENTITY_API'))

    if options.out:
        _DoWriteJavaOutput(options.out, values)
    if options.srcjar:
        _DoWriteJarOutput(options.srcjar, values)