()
| 43 | |
| 44 | @memoize |
| 45 | def get_args(): |
| 46 | # fuck PEP8 |
| 47 | configpath = os.path.join(os.path.dirname(__file__), '../config/config.ini') |
| 48 | parser = configargparse.ArgParser(default_config_files=[configpath], auto_env_var_prefix='POGOMAP_') |
| 49 | parser.add_argument('-a', '--auth-service', type=str.lower, action='append', default=[], |
| 50 | help='Auth Services, either one for all accounts or one per account: ptc or google. Defaults all to ptc.') |
| 51 | parser.add_argument('-u', '--username', action='append', default=[], |
| 52 | help='Usernames, one per account.') |
| 53 | parser.add_argument('-p', '--password', action='append', default=[], |
| 54 | help='Passwords, either single one for all accounts or one per account.') |
| 55 | parser.add_argument('-w', '--workers', type=int, |
| 56 | help='Number of search worker threads to start. Defaults to the number of accounts specified.') |
| 57 | parser.add_argument('-asi', '--account-search-interval', type=int, default=0, |
| 58 | help='Seconds for accounts to search before switching to a new account. 0 to disable.') |
| 59 | parser.add_argument('-ari', '--account-rest-interval', type=int, default=7200, |
| 60 | help='Seconds for accounts to rest when they fail or are switched out') |
| 61 | parser.add_argument('-ac', '--accountcsv', |
| 62 | help='Load accounts from CSV file containing "auth_service,username,passwd" lines') |
| 63 | parser.add_argument('-l', '--location', type=parse_unicode, |
| 64 | help='Location, can be an address or coordinates') |
| 65 | parser.add_argument('-j', '--jitter', help='Apply random -9m to +9m jitter to location', |
| 66 | action='store_true', default=False) |
| 67 | parser.add_argument('-st', '--step-limit', help='Steps', type=int, |
| 68 | default=12) |
| 69 | parser.add_argument('-sd', '--scan-delay', |
| 70 | help='Time delay between requests in scan threads', |
| 71 | type=float, default=10) |
| 72 | parser.add_argument('-ld', '--login-delay', |
| 73 | help='Time delay between each login attempt', |
| 74 | type=float, default=5) |
| 75 | parser.add_argument('-lr', '--login-retries', |
| 76 | help='Number of logins attempts before refreshing a thread', |
| 77 | type=int, default=3) |
| 78 | parser.add_argument('-mf', '--max-failures', |
| 79 | help='Maximum number of failures to parse locations before an account will go into a two hour sleep', |
| 80 | type=int, default=5) |
| 81 | parser.add_argument('-msl', '--min-seconds-left', |
| 82 | help='Time that must be left on a spawn before considering it too late and skipping it. eg. 600 would skip anything with < 10 minutes remaining. Default 0.', |
| 83 | type=int, default=0) |
| 84 | parser.add_argument('-dc', '--display-in-console', |
| 85 | help='Display Found Pokemon in Console', |
| 86 | action='store_true', default=False) |
| 87 | parser.add_argument('-H', '--host', help='Set web server listening host', |
| 88 | default='127.0.0.1') |
| 89 | parser.add_argument('-P', '--port', type=int, |
| 90 | help='Set web server listening port', default=5000) |
| 91 | parser.add_argument('-L', '--locale', |
| 92 | help='Locale for Pokemon names (default: {},\ |
| 93 | check {} for more)'. |
| 94 | format(config['LOCALE'], config['LOCALES_DIR']), default='en') |
| 95 | parser.add_argument('-c', '--china', |
| 96 | help='Coordinates transformer for China', |
| 97 | action='store_true') |
| 98 | parser.add_argument('-m', '--mock', type=str, |
| 99 | help='Mock mode - point to a fpgo endpoint instead of using the real PogoApi, ec: http://127.0.0.1:9090', |
| 100 | default='') |
| 101 | parser.add_argument('-ns', '--no-server', |
| 102 | help='No-Server Mode. Starts the searcher but not the Webserver.', |
no test coverage detected