https://github.com/ypyl/weather-telegram-bot
Tiny Telegram Bot to send weather info based on user location
https://github.com/ypyl/weather-telegram-bot
python raspberry-pi telegram-bot weather
Last synced: about 2 months ago
JSON representation
Tiny Telegram Bot to send weather info based on user location
- Host: GitHub
- URL: https://github.com/ypyl/weather-telegram-bot
- Owner: ypyl
- Created: 2021-05-23T11:04:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-02T20:35:10.000Z (almost 5 years ago)
- Last Synced: 2025-01-13T08:34:20.047Z (over 1 year ago)
- Topics: python, raspberry-pi, telegram-bot, weather
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Tiny Telegram Bot to send weather info based on user location
# Source Code
`configuration.py` contains the following constants:
- SUPPORTED_USER = show info for only this user
- DEFAULT_LOCATION_LON = default longitude
- DEFAULT_LOCATION_LAT = default latitude
- TELEGRAM_TOKEN = [telegram](https://core.telegram.org/bots) token
- WEATHER_API_KEY = [weather api](https://www.weatherapi.com) key
`weather-bot.py` contains the logic of the bot
`deploy.py` is a small helper to deploy the bot to raspberry pi (as I am using it to host the bot)
# Dependencies
- `python 3`
- `python-telegram-bot` - https://python-telegram-bot.org
# Helpers to debug on raspberry
See the status of service on raspberry:
`systemctl status weather-bot`
See logs of the service:
`journalctl -u weather-bot.service | tail -n 30`