├── location.gpx ├── requirements.txt ├── assets └── shot.png ├── static └── pokeball.png ├── update.applescript ├── readme.md ├── pokemap.py ├── .gitignore └── templates └── map.html /location.gpx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | flask 2 | -------------------------------------------------------------------------------- /assets/shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xhkz/pokemon-go-keyboard/HEAD/assets/shot.png -------------------------------------------------------------------------------- /static/pokeball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xhkz/pokemon-go-keyboard/HEAD/static/pokeball.png -------------------------------------------------------------------------------- /update.applescript: -------------------------------------------------------------------------------- 1 | tell application "System Events" to tell process "Xcode" 2 | click menu item "location" of menu 1 of menu item "Simulate Location" of menu 1 of menu bar item "Debug" of menu bar 1 3 | if exists (sheet 1 of window 1) then 4 | click (button "OK" of sheet 1 of window 1) 5 | end if 6 | end tell -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Pokemon Go Keyboard 2 | 3 | Play Pokemon Go with your keyboard in a browser 4 | 5 | ### Reverted to initial version and stopped update 6 | 7 | ![Shot](assets/shot.png) 8 | 9 | Environment 10 | ------------ 11 | - Python 2 or 3 12 | - Xcode 7 13 | 14 | Usage 15 | ------------ 16 | ```bash 17 | 1. Create new Xcode project with Single View Application (or any one you like) 18 | 2. Run the app on the phone that runs Pokemon Go 19 | 3. Xcode menu -> Debug -> Simulate Location -> add GPX File to Project, 20 | add location.gpx to it and click location option. 21 | 4. cd path-to-clone 22 | 5. [sudo] pip install -r requirements.txt 23 | 6. ./pokemap.py 24 | 7. Drag the marker or use your arrow keys to simulate your location 25 | ``` 26 | 27 | Credits 28 | ------------ 29 | [AbelIngrand](https://github.com/AbelIngrand) 30 | 31 | [dobiedad](https://github.com/dobiedad) 32 | 33 | [Pokemon-Go-Controller](https://github.com/kahopoon/Pokemon-Go-Controller) 34 | 35 | [PokemonGo-Map](https://github.com/AHAAAAAAA/PokemonGo-Map) 36 | -------------------------------------------------------------------------------- /pokemap.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python 2 | import os 3 | import argparse 4 | from threading import Lock 5 | 6 | from flask import Flask, render_template, request 7 | 8 | app = Flask(__name__) 9 | lock = Lock() 10 | 11 | 12 | @app.route('/') 13 | def poke_map(): 14 | return render_template('map.html') 15 | 16 | 17 | @app.route('/pos') 18 | def get_pos(): 19 | lat = request.args.get('lat') 20 | lng = request.args.get('lng') 21 | 22 | # ignore positions during writing location file 23 | if not lock.locked(): 24 | gpx_gen(lat, lng) 25 | 26 | return "OK" 27 | 28 | 29 | def gpx_gen(lat, lng): 30 | with lock: 31 | with open('location.gpx', 'w') as location: 32 | location.write('' % (lat, lng)) 33 | 34 | os.system('osascript update.applescript >/dev/null 2>&1') 35 | 36 | 37 | def main(): 38 | parser = argparse.ArgumentParser() 39 | parser.add_argument('-o', '--open', help='open browser', action='store_true', default=False) 40 | args = parser.parse_args() 41 | 42 | if args.open: 43 | os.system('open "http://localhost:5000"') 44 | 45 | 46 | if __name__ == '__main__': 47 | main() 48 | app.run(threaded=True, debug=False) 49 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | 3 | # Byte-compiled / optimized / DLL files 4 | __pycache__/ 5 | *.py[cod] 6 | *$py.class 7 | 8 | # C extensions 9 | *.so 10 | 11 | # Distribution / packaging 12 | .Python 13 | env/ 14 | build/ 15 | develop-eggs/ 16 | dist/ 17 | downloads/ 18 | eggs/ 19 | .eggs/ 20 | lib/ 21 | lib64/ 22 | parts/ 23 | sdist/ 24 | var/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a template 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .coverage 43 | .coverage.* 44 | .cache 45 | nosetests.xml 46 | coverage.xml 47 | *,cover 48 | .hypothesis/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | 58 | # Flask stuff: 59 | instance/ 60 | .webassets-cache 61 | 62 | # Scrapy stuff: 63 | .scrapy 64 | 65 | # Sphinx documentation 66 | docs/_build/ 67 | 68 | # PyBuilder 69 | target/ 70 | 71 | # IPython Notebook 72 | .ipynb_checkpoints 73 | 74 | # pyenv 75 | .python-version 76 | 77 | # celery beat schedule file 78 | celerybeat-schedule 79 | 80 | # dotenv 81 | .env 82 | 83 | # virtualenv 84 | venv/ 85 | ENV/ 86 | 87 | # Spyder project settings 88 | .spyderproject 89 | 90 | # Rope project settings 91 | .ropeproject 92 | 93 | -------------------------------------------------------------------------------- /templates/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Pokemon Go Keyboard 7 | 18 | 19 | 20 |
21 | 22 | 105 | 108 | 109 | 110 | --------------------------------------------------------------------------------