At our university's IT summer camp for high school students in 2019, we decided to teach programming by having the participants build their own Telegram bots. I developed a Telegram bot in advance that accompanied the students throughout the camp. This bot provided regular updates on camp activities through official-looking press releases, a digital version of the popular group game Assassin, and most importantly, a visual and collaborative code-breaking challenge.
For more background information, please view this post on my personal web page.
Install the requirements.
pip3 install -r requirements.txt
- Download the photos and licenses using the Wikipedia Image Crawler repository. You need to manually filter the photos according to which licenses you want to permit. It is fine to simply remove the photos and not update the license file. Place the photos in the
raw_image/places
folder. - Generate the sky masks using a sky removal algorithm. I used the skydetector repository. Place the resulting masks in the
raw_image/masks
folder. - Add semi-random fallback masks to the
raw_image/masks/fallback
folder. - The weather images should still be present in the repository but feel free to update them to your liking.
- Get an OpenWeather API key and place it in the
weather_key.txt
file
- Place the particpant data in the
participants.csv
file according to the format defined there. - Run
camp_data_import.py
- View the created MySQL database and take note of the login keys of the participants. You will need to hand those out to the participants so they can log on the bot.
Register a bot with the telegram bot father and place the API key in the token.txt
file.
Run the main.py
to run the bot.