-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fe0c182
Showing
10 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Pokemon GO server status | ||
|
||
Check the status of the Pokemon GO servers from your Menubar (MacOS only) | ||
|
||
 | ||
|
||
## Installation | ||
|
||
Just get the app from the release page, put it in your application folder and launch it! | ||
|
||
Optionally you can launch it on startup start by going in your mac setting under ``` Users & Groups ``` and dragging the application in your ``` login items ```. | ||
|
||
## Making .app from source | ||
|
||
- Install requirements | ||
|
||
``` pip install -r requirements.txt ``` | ||
|
||
- Build the .app | ||
|
||
``` python setup.py py2app ``` |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/python | ||
|
||
from bs4 import BeautifulSoup | ||
import rumps | ||
import requests | ||
|
||
|
||
class pokegostatus(rumps.App): | ||
|
||
@rumps.clicked("Manual refresh") | ||
def manual_refresh(self, _): | ||
self.refresh(self) | ||
|
||
@rumps.timer(10) | ||
def refresh(self, _): | ||
URL = "http://cmmcd.com/PokemonGo/" | ||
|
||
try: | ||
r = requests.get(URL) | ||
soup = BeautifulSoup(r.text, 'html.parser') | ||
status = soup.body.header.h2.font.text | ||
except: | ||
status = False | ||
|
||
if status == 'Online!': | ||
self.icon = "icons/pokeok.png" | ||
self.title = None | ||
elif status == 'Unstable!': | ||
self.icon = "icons/pokeunstable.png" | ||
self.title = None | ||
elif status == 'Offline!': | ||
self.icon = "icons/pokedown.png" | ||
self.title = None | ||
elif not status: | ||
self.icon = None | ||
self.title = "No Internet" | ||
|
||
|
||
if __name__ == "__main__": | ||
pokegostatus("pokegostatus", icon="icons/pokeinit.png").run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bs4 | ||
requests | ||
rumps | ||
py2app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from setuptools import setup | ||
|
||
APP = ['pokegostatus.py'] | ||
DATA_FILES = ['icons'] | ||
OPTIONS = { | ||
'iconfile':'appicon.icns', | ||
'argv_emulation': True, | ||
'plist': { | ||
'LSUIElement': True, | ||
}, | ||
'packages': ['rumps', 'bs4', 'requests'], | ||
} | ||
|
||
setup( | ||
app=APP, | ||
data_files=DATA_FILES, | ||
options={'py2app': OPTIONS}, | ||
setup_requires=['py2app'], | ||
) |