Mattia Mascarello
133f789c64
This commit refactors the `list_birthday` function in `main.py` to sort the birthdays by the remaining time until the next birthday. It introduces a new helper function `sort_close` that calculates the remaining time until the next birthday for each birthday in the list. The birthdays are then sorted based on this calculated value. |
||
---|---|---|
dataTypes.py | ||
LICENSE | ||
main.py | ||
README.md | ||
requirements.txt |
Birthday Reminder Bot
A simple telegram bot that reminds you of your friends' birthdays.
- Birthday list (current age, time to birthday, sorted)
- Monthly, weekly, daily reminders
I made this bot for my personal use, but you can use it too. Just follow the instructions below.
Installation
- Clone the repository
git clone git@github.com:MatMasIt/birthdaybot.git
- Create a virtual environment
python3 -m venv venv
- Activate the virtual environment
source venv/bin/activate
- Install the requirements
pip install -r requirements.txt
- Create a
.env
file in the root directory and add the following variables
TOKEN=YOUR_TELEGRAM_BOT_TOKEN
- Run the bot
python bot.py