Bot that reports whenever you want the COVID-19 status at your country. All the data is taken from Worldometers.
- A VPS (the 5$ Digital Ocean tier will ne nice for this)
- Python 3 installed on your VPS
- For Mastodon, you will need:
- A Mastodon account for your bot.
- An API key for your bot. Check Mastodon's docs if you don't know how to do this part.
- For Telegram, you will need:
- A Telegram bot account.
- A Telegram's API key. Both can be obtained from Botfather.
-
Clone or download and unzip the repo.
-
Create a virtual environment for the bot (optional) and install the requirements with
pip
. -
Rename the
settings.example.ini
tosettings.ini
-
Set your API keys for the service you want, Telegram, Mastodon or both.
-
Set your country in the
main.py
file, under the global variableCOUNTRY
, by default is Spain. -
To update the bot every 2 hours, add to your crontab something like this:
0 */2 * * * python3 /path/to/your/bot/folder/main.py
You can also run this bot on AWS Lambda, Heroku, PythonAnywhere, etc. Just choose your favourite.
My version of this bot is running on my Mastodon instance and serves Mastodona and Telegram. You can see it here:
Updated every two hours!