Antenna Trelegram is a Telegram bot that sends one picture to a mailing list of Telegram chats.
Each day at 8:30 am a job is triggered and the bot randomly retrieves an image from a private album on Imgur. This image is then processed by summing to it an overlay with a dinamically generated number, which is the number of days between the current date and 22/10/2017.
If you want to test it locally you have to make sure you have an account on Imgur with an album of any kind; you also have to register and authorize the application for your account, since Imgur uses OAuth2 (more info here).
You will also need Python installed (of course); then, follow these steps:
- get the API key for your bot from the BotFather
- setup a local environment with all the required variables (check the sample provided)
- create the Python Virtualenv with
py -m venv env
or any name you like - install the dependencies with
pip install -r requirements.txt
(if it doesn't work try withpip3 install -r requirements.txt
) - run with
python bot.py
This bot does make use of irony and was developed primarely for lighthearted humor in a private chat. No personal injury was inteded or even taken into account during development.
- Python Telegram Bot as wrapper for the Telegram API
- OpenCV Python for the image processing
- Imgur and the Imgur API as cloud storage for the images
- Heroku as deployment and hosting platform
- Heroku Redis as database for the mailing list