This is a Telegram bot that uses the sataako -service to inform users of rainfall in the Helsinki metropolitan area.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to have Python and pipenv installed on the machine that you want to run the bot on. In addition you need a Telegram API key for the bot.
Clone this repository, navigate to it on the command line and run the command below.
pipenv install
You have to set specific configuration variables that the app will use.
TELEGRAM_API_TOKEN
- The Telegram API token for your bot.APP_NAME_HEROKU
- The name of your Heroku app; only required if you are deploying the bot to Heroku.SATAAKO_SERVER_URL
- The url of the Sataako backend server with no "/" at the end.RAIN_WARNING_QUERY_INTERVAL
- The length of the interval for making queries to the server about rainfall at a location.
Once you have everything installed and the Telegram API token set the environment variables, you can start running the bot on your local machine.
Navigate to the directory on your command line and open the virtual environment shell. From that shell run command below.
python sataakobot.py --deploy-local
Set the configuration variables mentioned above to your Heroku app and then push the repository to the Heroku remote of your app.
- pipenv - Package and virtual environment management.
- python-telegram-bot Telegram bot wrapper that was "simply too good to refuse."
sataako/sataako-bot is licensed under the MIT License.