added some documentation for the weather.py script

This commit is contained in:
simon 2021-01-24 14:06:26 +07:00
parent dd1592a7e3
commit 93ba586592
2 changed files with 19 additions and 0 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
__pycache__
config

View File

@ -39,3 +39,21 @@ A bunch of simple bash scripts to be called via i3blocks.
* on right click: refreshes the current pending updates and echos result
* **wifiinfo.sh**: Echos current db level of signal strength.
* on left click: Uses nmcli to echo all device status
## weather_applet
Standalone script that pulls weather data from [openweathermap.org](https://openweathermap.org/) and prints out
current temparature and weather. Meant to be used from i3blocks.
### Config:
Get your free openweathermap API key from [here](https://home.openweathermap.org/api_keys).
Create a file called *config* in the same directory as the *weather.py* script and copy the sample
data from *config.sample*:
* Replace the dummy *openweathermap_api_key* with your key.
* Add *lat* and *lon* values with the latitude and longitude values from your location.
### Install:
None standard Python dependencies:
**python-requests** [requests](https://requests.readthedocs.io/en/master/)
* On Arch: `sudo pacman -S python-requests`
* Via Pip: `pip install requests`