Skip to content

Commit

Permalink
Update flags table on README (PokemonGoF#204)
Browse files Browse the repository at this point in the history
* Updated Gym Layout

Gym Layout now contains Icons like the rest of the items (except
Pokeballs)

* Update flags table

* Reformat get_args

* Update flags table

* Reformat get_args

* Add autorefresh flag to README

* Update flags table

* Reformat get_args

* added countdown timer until pokemon disappear

* changed the label so it displays both disappears-at and disappears-in

* changed label format

* Fix multiline string

* decoupled google maps from flask

* removed one more thing

* Cleaned up duplicate and unused imports.

* added some nice autoupdate fixes

* fix DecodeError crash

Completed: 59.5555555556%
[-] looping: step 135 of 225
Exception in thread search_thread:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "example.py", line 575, in main
    pokemonsJSON, ignore, only)
  File "example.py", line 600, in process_step
    profile_response))
  File "example.py", line 399, in get_heartbeat
    m5, )
  File "example.py", line 304, in get_profile
    return retrying_api_req(service, api, access_token, req, useauth=useauth)
  File "example.py", line 190, in retrying_api_req
    **kwargs)
  File "example.py", line 228, in api_req
    p_ret.ParseFromString(r.content)
  File "/usr/lib/python2.7/site-packages/google/protobuf/message.py", line 186, in ParseFromString
    self.MergeFromString(serialized)
  File "/usr/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 844, in MergeFromString
    raise message_mod.DecodeError('Unexpected end-group tag.')
DecodeError: Unexpected end-group tag.

* Fix for scanner drift (fixes PokemonGoF#229 and PokemonGoF#231)

1. Quickfix for scanner slowly drifting away from starting location:
  reset location to original at the end of looping steps

2. Also fix updating to the next location feature:
  don't update repeatedly and allow to change only longitude or latitude

* more autoupdate fixes

* Add 'Get Directions' to label

- Add link to google maps directions
- Move index to right of Pokemon name

* ugly hack to keep google flask AND autorefresh functionality

* Added support for Simplified Chinese(zh_cn) pokemon names.

Based on
https://wiki.52poke.com/wiki/%E5%AE%9D%E5%8F%AF%E6%A2%A6%E5%88%97%E8%A1%A8%EF%BC%88%E6%8C%89%E5%85%A8%E5%9B%BD%E5%9B%BE%E9%89%B4%E7%BC%96%E5%8F%B7%EF%BC%89/%E7%AE%80%E5%8D%95%E7%89%88

* Option description update.

* remove marker if duplicate exists

* Fix "AttributeError: lat and lng required" when using coordinates as location (PokemonGoF#241)

Previously, origin_lat and origin_lon was not set, causing an Attribute error when accessing the webpage.

* Fixed typo

Removed unnecessary braces

* added smaller images

* Fixed mobile scaling (PokemonGoF#240)

* Step fix (PokemonGoF#252)

* fixed the pokestop icon


* rebased the poke stop icon

* fixed display of steps and completion, fixed steplimit logic

* Reformat get_args

* Update flags table

* Add autorefresh flag to README

* Fix multiline string
  • Loading branch information
Hao Hu authored and JZ6 committed Jul 19, 2016
1 parent 926f312 commit e577849
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,32 @@ Building off [Mila432](https://github.com/Mila432/Pokemon_Go_API)'s PokemonGo AP
# Usage
`python example.py -a authService -u myUsername -p myPassword -l "Boulder, CO" -st 5`

| Flag | Description | Required |
|---------------------------------|-----------------------------------------------------------|----------|
| `-a` | Auth Service (ptc or google) | |
| `-u` | Username ||
| `-p` | Password ||
| `-l` | Any location Google Maps can understand ||
| `-st` | Steps to take ||
| `-ar` `--auto_refresh` `seconds`| Enables auto page reload. Value in seconds | |
| `-i` `--ignore` | Comma-separated list of Pokémon to ignore | |
| `-o` `--only` | Comma-separated list of Pokemon to search for exclusively | |
| `-dp` `--display-pokestop` | Display pokestop | |
| `-dg` `--display-gym` | Display gym | |
| `-H` `--host` | Set web server listening host | |
| `-P` `--port` | Set web server listening port | |
|`-L` `--locale` | Locale for Pokemon names: default en, check locale folder for more options | |
| Flag | Description | Required |
|----------------------------|-------------------------------------------------|----------|
| `-a` `--auth-service` | Auth service (PTC or google) | |
| `-u` `--username` | Username ||
| `-p` `--password` | Password ||
| `-l` `--location` | Any location Google Maps can understand ||
| `-st` `--step-limit` | Steps to take ||
| `-i` `--ignore` | Comma-separated list of Pokémon names to ignore | |
| `-o` `--only` | Comma-separated list of Pokémon names to search | |
| `-ar` `--auto-refresh` | Number of seconds on which to autorefresh | |
| `-dp` `--display-pokestop` | Display pokéstops | |
| `-dg` `--display-gym` | Display gyms | |
| `-H` `--host` | Set web server listening host | |
| `-P` `--port` | Set web server listening port | |
| `-L` `--locale` | Locale for Pokemon names: en (default), fr | |
| `-c` `--china` | Coordinates transformer for China | |
| `-d` `--debug` | Debug mode | |

_Note:
5 steps is approximately a 1.2km radius. More than 10 is redundant (you usually can't walk that far before despawn anyway)_



## Common Errors
> _`Exception, e <- Invalid syntax.`_
* You are using python 3, download python 2.7 instead.


> _`pip or python is not recognized as an internal or external command`_
* Replace pip with C:\Python27\Scripts\pip
Expand Down
25 changes: 13 additions & 12 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,27 +438,21 @@ def get_args():
parser.add_argument('-p', '--password', help='Password', required=False)
parser.add_argument(
'-l', '--location', type=parse_unicode, help='Location', required=True)
parser.add_argument('-st', '--step_limit', help='Steps', required=True)
parser.add_argument('-st', '--step-limit', help='Steps', required=True)
group = parser.add_mutually_exclusive_group(required=False)
group.add_argument(
'-i', '--ignore', help='Pokemon to ignore (comma separated)')
'-i', '--ignore', help='Comma-separated list of Pokémon names to ignore')
group.add_argument(
'-o', '--only', help='Only look for these pokemon (comma separated)')
parser.add_argument(
'-d', '--debug', help='Debug Mode', action='store_true')
parser.add_argument(
'-c',
'--china',
help='Coordinate transformer for China locations',
action='store_true')
'-o', '--only', help='Comma-separated list of Pokémon names to search')
parser.add_argument(
"-ar",
"--auto_refresh",
help="Enables an autorefresh that behaves the same as a page reload. Needs an integer value for the amount of seconds")
help="Enables an autorefresh that behaves the same as a page reload. " +
"Needs an integer value for the amount of seconds")
parser.add_argument(
'-dp',
'--display-pokestop',
help='Display Pokestop',
help='Display pokéstop',
action='store_true',
default=False)
parser.add_argument(
Expand All @@ -483,6 +477,13 @@ def get_args():
"--locale",
help="Locale for Pokemon names: default en, check locale folder for more options",
default="en")
parser.add_argument(
'-c',
'--china',
help='Coordinates transformer for China',
action='store_true')
parser.add_argument(
'-d', '--debug', help='Debug Mode', action='store_true')
parser.set_defaults(DEBUG=True)
return parser.parse_args()

Expand Down

0 comments on commit e577849

Please sign in to comment.