def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument('--long_list', '-l', action='store_true', default=False, help='Show more columns of output.') arg_parser.add_argument( '--plus_domains', '-p', action='store_true', default=False, help='Show output from Google Plus Domains Profile.') arg_parser.add_argument('--user_email', '-u', required=True, help='User email address [REQUIRED].', type=validators.EmailValidatorType())
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineForceFlagWithDefaultFalse(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument('--output_file', '-o', default=_REPORT_USERS_FILE_NAME, help='Supply a name for the output report file.', type=validators.NoWhitespaceValidatorType()) arg_parser.add_argument('--query_filter', help='Optionally filter on a field.', type=validators.NoWhitespaceValidatorType()) arg_parser.add_argument('--csv_fields', help='List of fields to emit to csv.', type=validators.ListValidatorType()) arg_parser.add_argument('--first_n', type=int, default=0, help='Show the first n users in the list.')
def AddFlags(arg_parser): """Handle command line flags unique to this script. This is unusual in that it requires 4 command line parameters and only sets the required user fields. Many other fields could be exposed and set as an extended example. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument('--user_email', '-u', required=True, help='User email address [REQUIRED].', type=validators.EmailValidatorType()) arg_parser.add_argument('--first_name', '-n', required=True, help='First name within the domain [REQUIRED].', type=validators.NoWhitespaceValidatorType()) arg_parser.add_argument('--last_name', '-l', required=True, help='Last name within the domain [REQUIRED].', type=validators.NoWhitespaceValidatorType()) arg_parser.add_argument('--password', '-p', required=True, help='Domain user password [REQUIRED].', type=validators.NoWhitespaceValidatorType())
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineForceFlagWithDefaultFalse(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument('--create_state_report_csv', action='store_true', default=False, help=('Output user email addresses and profile state ' 'to a csv file.')) arg_parser.add_argument('--first_n', type=int, default=0, help='Gather profile status for the first n users.') arg_parser.add_argument('--resume', '-r', action='store_true', default=False, help=('Resume if interrupted while gathering ' 'profiles.')) arg_parser.add_argument('--show_users', '-u', action='store_true', default=False, help='Show list of users who are missing profiles.') arg_parser.add_argument('--use_local_profile_data', action='store_true', default=False, help='Use local, previously-retrieved profile data.')
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument( '--client_id', '-c', required=True, help=('Client ID to which the token was issued (e.g. twitter.com) ' '[REQUIRED].'), type=validators.NoWhitespaceValidatorType()) arg_parser.add_argument( '--first_n', type=int, default=0, help='Revoke tokens for the first n users in the domain.') arg_parser.add_argument('--resume', '-r', action='store_true', default=False, help='Resume an interrupted gather command.') arg_parser.add_argument( '--use_local_token_stats', action='store_true', default=False, help=('Only attempt to revoke tokens listed in the local stats file ' 'created by a previous run of gather_domain_token_stats.'))
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument('--long_list', '-l', action='store_true', default=False, help='Show more columns of output.') arg_parser.add_argument( '--client_id', '-c', required=True, help=('Client ID to which the token was issued (e.g. twitter.com) ' '[REQUIRED].'), type=validators.NoWhitespaceValidatorType()) arg_parser.add_argument('--user_email', '-u', required=True, help='User email address [REQUIRED].', type=validators.EmailValidatorType())
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser)
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineForceFlagWithDefaultFalse(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument('--csv', action='store_true', default=False, help='Output results to a csv file.')
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineForceFlagWithDefaultFalse(arg_parser, required=True) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument( '--user_email', '-u', required=True, help='User email address [REQUIRED].', type=validators.EmailValidatorType())
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineForceFlagWithDefaultFalse(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument('--first_n', type=int, default=0, help=('Gather tokens for the first n users in the ' 'domain.')) arg_parser.add_argument('--resume', '-r', action='store_true', default=False, help='Resume an interrupted gather command.')
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineForceFlagWithDefaultFalse(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument('--json', action='store_true', default=False, help='Output results to a json file.') arg_parser.add_argument('--first_n', type=int, default=0, help='Show the first n users in the list.')
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineForceFlagWithDefaultFalse( arg_parser, required=True, help_string=( 'This is a destructive command. Please confirm your intent ' 'to irreversibly revoke tokens by adding --force.')) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) blacklist_help = ( 'Name of a text file under ./working/<domain> that lists ' 'unapproved %ss one to a line.\n (suggested: %s).') arg_parser.add_argument('--client_blacklist_file', '-c', default=None, help=blacklist_help % ('client', _CLIENT_BLACKLIST_FILE_NAME), type=validators.NoWhitespaceValidatorType()) arg_parser.add_argument('--scope_blacklist_file', '-s', default=None, help=blacklist_help % ('scope', _SCOPE_BLACKLIST_FILE_NAME), type=validators.NoWhitespaceValidatorType()) arg_parser.add_argument( '--hide_timing', action='store_true', default=False, help='Stop logging the elapsed time of longer functions.') arg_parser.add_argument('--use_local_token_stats', action='store_true', default=False, help='Avoid regenerating token stats.') arg_parser.add_argument('--use_local_users_list', action='store_true', default=False, help='Avoid regenerating domain users list.')
def AddFlags(arg_parser): """Handle command line flags unique to this script. Args: arg_parser: object from argparse.ArgumentParser() to accumulate flags. """ common_flags.DefineAppsDomainFlagWithDefault(arg_parser) common_flags.DefineForceFlagWithDefaultFalse(arg_parser) common_flags.DefineVerboseFlagWithDefaultFalse(arg_parser) arg_parser.add_argument('--console', action='store_true', default=True, help='Print output on console.') arg_parser.add_argument('--csv', action='store_true', default=False, help='Output results to a csv file.') arg_parser.add_argument('--long_list', '-l', action='store_true', default=False, help='Show details of client_ids and scopes.') arg_parser.add_argument('--show_users', '-u', action='store_true', default=False, help='Show details of users (enables --long_list).') arg_parser.add_argument('--top_n', type=int, default=0, help='Show top n elements in each report.')