Setup argparse arguments.

    :return: The parser which :class:`MypolrCli` expects parsed arguments from.
    :rtype: argparse.ArgumentParser
345604
def make_argparser():
    
    parser = argparse.ArgumentParser(prog='mypolr',
                                     description="Interacts with the Polr Project's API.\n\n"
                                                 "User Guide and documentation: https://mypolr.readthedocs.io",
                                     formatter_class=argparse.ArgumentDefaultsHelpFormatter,
                                     epilog="NOTE: if configurations are saved, they are stored as plain text on disk, "
                                            "and can be read by anyone with access to the file.")
    parser.add_argument("-v", "--version", action="store_true", help="Print version and exit.")

    parser.add_argument("url", nargs='?', default=None, help="The url to process.")

    api_group = parser.add_argument_group('API server arguments',
                                          'Use these for configure the API. Can be stored locally with --save.')

    api_group.add_argument("-s", "--server", default=None, help="Server hosting the API.")
    api_group.add_argument("-k", "--key", default=None, help="API_KEY to authenticate against server.")
    api_group.add_argument("--api-root", default=DEFAULT_API_ROOT,
                           help="API endpoint root.")

    option_group = parser.add_argument_group('Action options',
                                             'Configure the API action to use.')

    option_group.add_argument("-c", "--custom", default=None,
                              help="Custom short url ending.")
    option_group.add_argument("--secret", action="store_true",
                              help="Set option if using secret url.")
    option_group.add_argument("-l", "--lookup", action="store_true",
                              help="Perform lookup action instead of shorten action.")

    manage_group = parser.add_argument_group('Manage credentials',
                                             'Use these to save, delete or update SERVER, KEY and/or '
                                             'API_ROOT locally in ~/.mypolr/config.ini.')

    manage_group.add_argument("--save", action="store_true",
                              help="Save configuration (including credentials) in plaintext(!).")
    manage_group.add_argument("--clear", action="store_true",
                              help="Clear configuration.")
    return parser
514563
def parse_args():
    
    parser = argparse.ArgumentParser()
    parser.add_argument('-M', action='store_true')
    parser.add_argument('-m', action='store_true')
    parser.add_argument('-f', action='store_true')
    args = parser.parse_args()
    major, minor, fix = args.M, args.m, args.f
    if major + minor + fix != 1:
        fail('Please select one and only one action.')
    return major, minor, fix
593141
def add_arguments(self, parser):
        
        group = parser.add_mutually_exclusive_group(required=True)
        group.add_argument('-l', '--list', nargs='?',
                           type=str.lower, default='_',
                           choices=['usb', 'ip'],
                           help='list all the connected emulators')
        group.add_argument('-s', '--supported', nargs=1,
                           help='query whether a device is supported')
        group.add_argument('-t', '--test', action='store_true',
                           help='perform a self-test')
        return None
178141
def setup_parser():
    ''''''
    parser = argparse.ArgumentParser(description='Add random pages to existing site.')
    parser.add_argument('-d','--directory', action='store', default= os.getcwd(),
                                 help='Site directory (must be a valid s2 structure).')
    parser.add_argument('-n','--number', action='store', type=int, default = 20,
                                 help='Number of pages to generate.')

    return parser
56261
def setup_parser():
    """"""
    parser = argparse.ArgumentParser()
    parser.add_argument('-p', '--port', type=int, default=5005)
    parser.add_argument('-i', '--interval', type=int, default=480)
    parser.add_argument('host', type=str, help='hostname')
    return parser
485485
def args(self, *args, **kwargs):
        
        self._any_args = False
        self._arguments_rule.set_args(*args, **kwargs)
        return self
710033
def build_argparser():
    """"""
    parser = ArgumentParser('Utility for managing MAR files')
    create_group = parser.add_argument_group("Create a MAR file")
    create_group.add_argument("-c", "--create", metavar="MARFILE", help="create MAR")
    create_group.add_argument("-V", "--productversion", dest="productversion",
                              help="product/version string")
    create_group.add_argument("-H", "--channel", dest="channel",
                              help="channel this MAR file is applicable to")
    create_group.add_argument("files", nargs=REMAINDER,
                              help="files to add to the MAR file")

    extract_group = parser.add_argument_group("Extract a MAR file")
    extract_group.add_argument("-x", "--extract", help="extract MAR", metavar="MARFILE")

    list_group = parser.add_argument_group("Print information on a MAR file")
    list_group.add_argument("-t", "--list", help="print out MAR contents",
                            metavar="MARFILE")
    list_group.add_argument("-T", "--list-detailed", metavar="MARFILE",
                            help="print out MAR contents including signatures")

    verify_group = parser.add_argument_group("Verify a MAR file")
    verify_group.add_argument("-v", "--verify", metavar="MARFILE",
                              help="verify the marfile")

    parser.add_argument("-j", "--bzip2", action="store_const", dest="compression",
                        const="bz2", help="compress/decompress members with BZ2")
    parser.add_argument("-J", "--xz", action="store_const", dest="compression",
                        const="xz", help="compress/decompress archive with XZ")
    parser.add_argument("--auto", action="store_const", dest="compression",
                        const="auto", help="automatically decompress contents")

    parser.add_argument("-k", "--keyfiles", dest="keyfiles", action='append',
                        help="sign/verify with given key(s)")
    parser.add_argument("-C", "--chdir", dest="chdir",
                        help="chdir to this directory before creating or "
                        "extracing; location of marfile isn't affected by "
                        "this option.")
    parser.add_argument("--verbose", dest="loglevel", action="store_const",
                        const=logging.DEBUG, default=logging.WARN,
                        help="increase logging verbosity")
    parser.add_argument('--version', action='version', version='mar version {}'.format(mardor.version_str))

    signing_group = parser.add_argument_group('Sign a MAR file')
    signing_group.add_argument('--hash', help='output hash for signing', choices=('sha1', 'sha384'))
    signing_group.add_argument('--asn1', help='format hash as an ASN1 DigestInfo block',
                               default=False, action='store_true')
    signing_group.add_argument('--add-signature', help='inject signature', nargs=3,
                               metavar=('input', 'output', 'signature'))

    return parser
146670
def parse_arguments():
    

    # define supported command line arguments
    parser = argparse.ArgumentParser(description='Common interface for the ' +
                                                 'WakaTime api.')
    parser.add_argument('--entity', dest='entity', metavar='FILE',
                        action=FileAction,
                        help='Absolute path to file for the heartbeat. Can ' +
                             'also be a url, domain or app when ' +
                             '--entity-type is not file.')
    parser.add_argument('--file', dest='file', action=FileAction,
                        help=argparse.SUPPRESS)
    parser.add_argument('--key', dest='key', action=StoreWithoutQuotes,
                        help='Your wakatime api key; uses api_key from ' +
                             '~/.wakatime.cfg by default.')
    parser.add_argument('--write', dest='is_write', action='store_true',
                        help='When set, tells api this heartbeat was ' +
                             'triggered from writing to a file.')
    parser.add_argument('--plugin', dest='plugin', action=StoreWithoutQuotes,
                        help='Optional text editor plugin name and version ' +
                             'for User-Agent header.')
    parser.add_argument('--time', dest='timestamp', metavar='time',
                        type=float, action=StoreWithoutQuotes,
                        help='Optional floating-point unix epoch timestamp. ' +
                             'Uses current time by default.')
    parser.add_argument('--lineno', dest='lineno', action=StoreWithoutQuotes,
                        help='Optional line number. This is the current ' +
                             'line being edited.')
    parser.add_argument('--cursorpos', dest='cursorpos',
                        action=StoreWithoutQuotes,
                        help='Optional cursor position in the current file.')
    parser.add_argument('--entity-type', dest='entity_type',
                        action=StoreWithoutQuotes,
                        help='Entity type for this heartbeat. Can be ' +
                             '"file", "domain" or "app". Defaults to "file".')
    parser.add_argument('--category', dest='category',
                        action=StoreWithoutQuotes,
                        help='Category of this heartbeat activity. Can be ' +
                             '"coding", "building", "indexing", ' +
                             '"debugging", "running tests", ' +
                             '"writing tests", "manual testing", ' +
                             '"code reviewing", "browsing", or "designing". ' +
                             'Defaults to "coding".')
    parser.add_argument('--proxy', dest='proxy', action=StoreWithoutQuotes,
                        help='Optional proxy configuration. Supports HTTPS '+
                             'and SOCKS proxies. For example: '+
                             'https://user:pass@host:port or '+
                             'socks5://user:pass@host:port or ' +
                             'domain\\user:pass')
    parser.add_argument('--no-ssl-verify', dest='nosslverify',
                        action='store_true',
                        help='Disables SSL certificate verification for HTTPS '+
                             'requests. By default, SSL certificates are ' +
                             'verified.')
    parser.add_argument('--ssl-certs-file', dest='ssl_certs_file',
                        action=StoreWithoutQuotes,
                        help='Override the bundled Python Requests CA certs ' +
                             'file. By default, uses certifi for ca certs.')
    parser.add_argument('--project', dest='project', action=StoreWithoutQuotes,
                        help='Optional project name.')
    parser.add_argument('--alternate-project', dest='alternate_project',
                        action=StoreWithoutQuotes,
                        help='Optional alternate project name. ' +
                             'Auto-discovered project takes priority.')
    parser.add_argument('--alternate-language', dest='alternate_language',
                        action=StoreWithoutQuotes,
                        help=argparse.SUPPRESS)
    parser.add_argument('--language', dest='language',
                        action=StoreWithoutQuotes,
                        help='Optional language name. If valid, takes ' +
                             'priority over auto-detected language.')
    parser.add_argument('--local-file', dest='local_file', metavar='FILE',
                        action=FileAction,
                        help='Absolute path to local file for the ' +
                             'heartbeat. When --entity is a remote file, ' +
                             'this local file will be used for stats and ' +
                             'just the value of --entity sent with heartbeat.')
    parser.add_argument('--hostname', dest='hostname',
                        action=StoreWithoutQuotes,
                        help='Hostname of current machine.')
    parser.add_argument('--disable-offline', dest='offline',
                        action='store_false',
                        help='Disables offline time logging instead of ' +
                             'queuing logged time.')
    parser.add_argument('--disableoffline', dest='offline_deprecated',
                        action='store_true',
                        help=argparse.SUPPRESS)
    parser.add_argument('--hide-file-names', dest='hide_file_names',
                        action='store_true',
                        help='Obfuscate filenames. Will not send file names ' +
                             'to api.')
    parser.add_argument('--hide-filenames', dest='hide_filenames',
                        action='store_true',
                        help=argparse.SUPPRESS)
    parser.add_argument('--hidefilenames', dest='hidefilenames',
                        action='store_true',
                        help=argparse.SUPPRESS)
    parser.add_argument('--hide-project-names', dest='hide_project_names',
                        action='store_true',
                        help='Obfuscate project names. When a project ' +
                             'folder is detected instead of using the ' +
                             'folder name as the project, a ' +
                             '.wakatime-project file is created with a ' +
                             'random project name.')
    parser.add_argument('--exclude', dest='exclude', action='append',
                        help='Filename patterns to exclude from logging. ' +
                             'POSIX regex syntax. Can be used more than once.')
    parser.add_argument('--exclude-unknown-project',
                        dest='exclude_unknown_project', action='store_true',
                        help='When set, any activity where the project ' +
                             'cannot be detected will be ignored.')
    parser.add_argument('--include', dest='include', action='append',
                        help='Filename patterns to log. When used in ' +
                             'combination with --exclude, files matching ' +
                             'include will still be logged. POSIX regex ' +
                             'syntax. Can be used more than once.')
    parser.add_argument('--include-only-with-project-file',
                        dest='include_only_with_project_file',
                        action='store_true',
                        help='Disables tracking folders unless they contain ' +
                             'a .wakatime-project file. Defaults to false.')
    parser.add_argument('--ignore', dest='ignore', action='append',
                        help=argparse.SUPPRESS)
    parser.add_argument('--extra-heartbeats', dest='extra_heartbeats',
                        action='store_true',
                        help='Reads extra heartbeats from STDIN as a JSON ' +
                             'array until EOF.')
    parser.add_argument('--log-file', dest='log_file',
                        action=StoreWithoutQuotes,
                        help='Defaults to ~/.wakatime.log.')
    parser.add_argument('--logfile', dest='logfile', action=StoreWithoutQuotes,
                        help=argparse.SUPPRESS)
    parser.add_argument('--api-url', dest='api_url', action=StoreWithoutQuotes,
                        help='Heartbeats api url. For debugging with a ' +
                             'local server.')
    parser.add_argument('--apiurl', dest='apiurl', action=StoreWithoutQuotes,
                        help=argparse.SUPPRESS)
    parser.add_argument('--timeout', dest='timeout', type=int,
                        action=StoreWithoutQuotes,
                        help='Number of seconds to wait when sending ' +
                             'heartbeats to api. Defaults to 60 seconds.')
    parser.add_argument('--sync-offline-activity',
                        dest='sync_offline_activity',
                        action=StoreWithoutQuotes,
                        help='Amount of offline activity to sync from your ' +
                             'local ~/.wakatime.db sqlite3 file to your ' +
                             'WakaTime Dashboard before exiting. Can be ' +
                             '"none" or a positive integer number. Defaults ' +
                             'to 5, meaning for every heartbeat sent while ' +
                             'online 5 offline heartbeats are synced. Can ' +
                             'be used without --entity to only sync offline ' +
                             'activity without generating new heartbeats.')
    parser.add_argument('--config', dest='config', action=StoreWithoutQuotes,
                        help='Defaults to ~/.wakatime.cfg.')
    parser.add_argument('--verbose', dest='verbose', action='store_true',
                        help='Turns on debug messages in log file.')
    parser.add_argument('--version', action='version', version=__version__)

    # parse command line arguments
    args = parser.parse_args()

    # use current unix epoch timestamp by default
    if not args.timestamp:
        args.timestamp = time.time()

    # parse ~/.wakatime.cfg file
    configs = parseConfigFile(args.config)

    # update args from configs
    if not args.hostname:
        if configs.has_option('settings', 'hostname'):
            args.hostname = configs.get('settings', 'hostname')
    if not args.key:
        default_key = None
        if configs.has_option('settings', 'api_key'):
            default_key = configs.get('settings', 'api_key')
        elif configs.has_option('settings', 'apikey'):
            default_key = configs.get('settings', 'apikey')
        if default_key:
            args.key = default_key
        else:
            try:
                parser.error('Missing api key. Find your api key from wakatime.com/settings/api-key.')
            except SystemExit:
                raise SystemExit(AUTH_ERROR)

    is_valid = not not re.match(r'^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$', args.key, re.I)
    if not is_valid:
        try:
            parser.error('Invalid api key. Find your api key from wakatime.com/settings/api-key.')
        except SystemExit:
            raise SystemExit(AUTH_ERROR)

    if not args.entity:
        if args.file:
            args.entity = args.file
        elif not args.sync_offline_activity or args.sync_offline_activity == 'none':
            parser.error('argument --entity is required')

    if not args.sync_offline_activity:
        args.sync_offline_activity = DEFAULT_SYNC_OFFLINE_ACTIVITY
    if args.sync_offline_activity == 'none':
        args.sync_offline_activity = 0
    try:
        args.sync_offline_activity = int(args.sync_offline_activity)
        if args.sync_offline_activity < 0:
            raise Exception('Error')
    except:
        parser.error('argument --sync-offline-activity must be "none" or an integer number')

    if not args.language and args.alternate_language:
        args.language = args.alternate_language

    if not args.exclude:
        args.exclude = []
    if configs.has_option('settings', 'ignore'):
        try:
            for pattern in configs.get('settings', 'ignore').split("\n"):
                if pattern.strip() != '':
                    args.exclude.append(pattern)
        except TypeError:  # pragma: nocover
            pass
    if configs.has_option('settings', 'exclude'):
        try:
            for pattern in configs.get('settings', 'exclude').split("\n"):
                if pattern.strip() != '':
                    args.exclude.append(pattern)
        except TypeError:  # pragma: nocover
            pass
    if not args.include_only_with_project_file and configs.has_option('settings', 'include_only_with_project_file'):
        args.include_only_with_project_file = configs.get('settings', 'include_only_with_project_file') == 'true'
    if not args.include:
        args.include = []
    if configs.has_option('settings', 'include'):
        try:
            for pattern in configs.get('settings', 'include').split("\n"):
                if pattern.strip() != '':
                    args.include.append(pattern)
        except TypeError:  # pragma: nocover
            pass
    if not args.exclude_unknown_project and configs.has_option('settings', 'exclude_unknown_project'):
        args.exclude_unknown_project = configs.getboolean('settings', 'exclude_unknown_project')
    boolean_or_list('hide_file_names', args, configs, alternative_names=['hide_filenames', 'hidefilenames'])
    boolean_or_list('hide_project_names', args, configs, alternative_names=['hide_projectnames', 'hideprojectnames'])
    if args.offline_deprecated:
        args.offline = False
    if args.offline and configs.has_option('settings', 'offline'):
        args.offline = configs.getboolean('settings', 'offline')
    if not args.proxy and configs.has_option('settings', 'proxy'):
        args.proxy = configs.get('settings', 'proxy')
    if args.proxy:
        pattern = r'^((https?|socks5)://)?([^:@]+(:([^:@])+)?@)?[^:]+(:\d+)?$'
        if '\\' in args.proxy:
            pattern = r'^.*\\.+$'
        is_valid = not not re.match(pattern, args.proxy, re.I)
        if not is_valid:
            parser.error('Invalid proxy. Must be in format ' +
                         'https://user:pass@host:port or ' +
                         'socks5://user:pass@host:port or ' +
                         'domain\\user:pass.')
    if configs.has_option('settings', 'no_ssl_verify'):
        args.nosslverify = configs.getboolean('settings', 'no_ssl_verify')
    if configs.has_option('settings', 'ssl_certs_file'):
        args.ssl_certs_file = configs.get('settings', 'ssl_certs_file')
    if not args.verbose and configs.has_option('settings', 'verbose'):
        args.verbose = configs.getboolean('settings', 'verbose')
    if not args.verbose and configs.has_option('settings', 'debug'):
        args.verbose = configs.getboolean('settings', 'debug')
    if not args.log_file and args.logfile:
        args.log_file = args.logfile
    if not args.log_file and configs.has_option('settings', 'log_file'):
        args.log_file = configs.get('settings', 'log_file')
    if not args.log_file and os.environ.get('WAKATIME_HOME'):
        home = os.environ.get('WAKATIME_HOME')
        args.log_file = os.path.join(os.path.expanduser(home), '.wakatime.log')
    if not args.api_url and args.apiurl:
        args.api_url = args.apiurl
    if not args.api_url and configs.has_option('settings', 'api_url'):
        args.api_url = configs.get('settings', 'api_url')
    if not args.timeout and configs.has_option('settings', 'timeout'):
        try:
            args.timeout = int(configs.get('settings', 'timeout'))
        except ValueError:
            print(traceback.format_exc())

    return args, configs
234670
def create_parser(self, prog_name, subcommand):
        
        parser = OptionParser(prog=prog_name,
                              usage=self.usage(subcommand),
                              option_list=self.option_list)
        return parser
463919
def _prepare_arguments(self, arguments):
        
        # Split arguments if given as string
        if arguments is not None:
            if isinstance(arguments, basestring):
                self.arguments = arguments.split()
            else:
                self.arguments = arguments
        # Otherwise properly decode command line arguments
        else:
            self.arguments = [arg.decode("utf-8") for arg in sys.argv[1:]]
26115
def _attach_arguments(self):
        """"""
        for arg in self.arguments:
            self.parser.add_argument(*arg[0], **arg[1])
869415
def process_arguments():
    
    parser = argparse.ArgumentParser(description="Extract a table from the "
                                                 "given text")
    parser.add_argument("text", type=argparse.FileType('r'),
                        help="the text to analyse")
    parser.add_argument("--prefix", "-p", type=natural, default=0,
                        dest="prefix", help="if not 0, the maximum length of "
                                            "prefixes to consider when "
                                            "choosing the next character "
                                            "(default: 0)")
    parser.add_argument("--flatten", "-f", action="store_true", default=False,
                        dest="flatten", help="flatten the table")
    parser.add_argument("--check", "-c", action="store_true", default=False,
                        dest="check", help="also check that the table is "
                                           "complete")
    parser.add_argument("--output", "-o", type=argparse.FileType('wb'),
                        default=None, dest="output",
                        help="the output destination; "
                             "if missing, print the table")
    return parser.parse_args()
620502
def create_argparser():
    
    parser = argparse.ArgumentParser()
    arg_defaults = {
        "daemon": False,
        "loop": False,
        "listpresets": False,
        "config": None,
        "debug": False,
        "sleeptime": 300,
        "version": False,
        "verbose_count": 0
    }

    # add generic client options to the CLI:
    parser.add_argument("-c", "--config", dest="config",
                        help="config file", default=arg_defaults["config"])
    parser.add_argument("--list-presets", dest="listpresets",
                        help="list all available presets",
                        action="store_true", default=arg_defaults["listpresets"])
    parser.add_argument("-d", "--daemon", dest="daemon",
                        help="go into daemon mode (implies --loop)",
                        action="store_true", default=arg_defaults["daemon"])
    parser.add_argument("--debug", dest="debug",
                        help="increase logging level to DEBUG (DEPRECATED, please use -vvv)",
                        action="store_true", default=arg_defaults["debug"])
    parser.add_argument("--loop", dest="loop",
                        help="loop forever (default is to update once)",
                        action="store_true", default=arg_defaults["loop"])
    parser.add_argument("--sleeptime", dest="sleeptime",
                        help="how long to sleep between checks in seconds",
                        default=arg_defaults["sleeptime"])
    parser.add_argument("--version", dest="version",
                        help="show version and exit",
                        action="store_true", default=arg_defaults["version"])
    parser.add_argument("-v", "--verbose", dest="verbose_count",
                        action="count", default=arg_defaults["verbose_count"],
                        help="increases log verbosity for each occurrence")

    return parser, arg_defaults
1194816
def parse_arguments():
    """"""
    parser = create_parser()
    args = parser.parse_args()
    if not args.role_requirements_old_commit:
        args.role_requirements_old_commit = args.role_requirements
    if not args.rpc_product_old_commit:
        args.rpc_product_old_commit = args.rpc_product
    return args
949722
def init_parser(self):
        
        parser = argparse.ArgumentParser(description='ROCA TLS Fingerprinter')

        parser.add_argument('--debug', dest='debug', default=False, action='store_const', const=True,
                            help='Debugging logging')

        parser.add_argument('--dump', dest='dump', default=False, action='store_const', const=True,
                            help='Dump all processed info')

        parser.add_argument('--flatten', dest='flatten', default=False, action='store_const', const=True,
                            help='Flatten the dump')

        parser.add_argument('--indent', dest='indent', default=False, action='store_const', const=True,
                            help='Indent the dump')

        parser.add_argument('--hosts', dest='hosts', default=False, action='store_const', const=True,
                            help='Arguments are host names not file names')

        parser.add_argument('files', nargs=argparse.ZERO_OR_MORE, default=[],
                            help='files to process')
        return parser
881200
def setup_parser(sub_parsers):
    
    parser = sub_parsers.add_parser("index", prog="law index", description="Create or update the"
        " (human-readable) law task index file ({}). This is only required for the shell"
        " auto-completion.".format(Config.instance().get("core", "index_file")))

    parser.add_argument("--modules", "-m", nargs="+", help="additional modules to traverse")
    parser.add_argument("--no-externals", "-e", action="store_true", help="skip external tasks")
    parser.add_argument("--remove", "-r", action="store_true", help="remove the index file and"
        " exit")
    parser.add_argument("--location", "-l", action="store_true", help="print the location of the"
        " index file and exit")
    parser.add_argument("--verbose", "-v", action="store_true", help="verbose output")
274332
def add_arguments(self, parser):
        
        parser.description = __doc__
        parser.formatter_class = argparse.RawDescriptionHelpFormatter
        parser.add_argument("--debug", action="store_true", help="Debug level logging")
        parser.add_argument(
            "--force",
            action="store_true",
            help="Import even if local database is not empty",
        )
        parser.add_argument("--clear", action="store_true", help="Clear local database")
        parser.add_argument(
            "--cert-pub",
            dest="cert_pem_path",
            action="store",
            help="Path to PEM formatted public key of certificate",
        )
        parser.add_argument(
            "--cert-key",
            dest="cert_key_path",
            action="store",
            help="Path to PEM formatted private key of certificate",
        )
        parser.add_argument(
            "--public",
            action="store_true",
            help="Do not use certificate even if available",
        )
        parser.add_argument(
            "--timeout",
            type=float,
            action="store",
            default=DEFAULT_TIMEOUT_SEC,
            help="Timeout for D1 API call to the source MN",
        )
        parser.add_argument(
            "--workers",
            type=int,
            action="store",
            default=DEFAULT_N_WORKERS,
            help="Max number workers making concurrent connections to the source MN",
        )
        parser.add_argument(
            "--object-page-size",
            type=int,
            action="store",
            default=d1_common.const.DEFAULT_SLICE_SIZE,
            help="Number of objects to retrieve in each listObjects() call",
        )
        parser.add_argument(
            "--log-page-size",
            type=int,
            action="store",
            default=d1_common.const.DEFAULT_SLICE_SIZE,
            help="Number of log records to retrieve in each getLogRecords() call",
        )
        parser.add_argument(
            "--major",
            type=int,
            action="store",
            help="Use API major version instead of finding by connecting to CN",
        )
        parser.add_argument(
            "--only-log", action="store_true", help="Only import event logs"
        )
        parser.add_argument(
            "--max-obj",
            type=int,
            action="store",
            help="Limit number of objects to import",
        )
        parser.add_argument("baseurl", help="Source MN BaseURL")