A Python-based automated timetable notification system that sends daily class schedules and reminders via Telegram.
AutoTimetable is a simple but powerful tool designed to help students keep track of their daily class schedules, upcoming exams, and items to bring to school or college. The system reads timetable data from CSV files, determines the current day order, and sends formatted notifications to specified Telegram users.
- 📅 Automatic day order tracking and rotation
- 📝 Daily timetable notifications with class schedules
- 📚 Customizable "items to bring" reminders for each day
- 📊 Upcoming exam reminders (within 7 days)
- 🎉 Special messages for holidays and events
- 📱 Multi-user Telegram notifications
- Python 3.6+
- Required packages:
- pandas
- requests
- python-dateutil
- pytz
All dependencies can be installed using the provided requirements.txt file.
timetable_bot.py- Main script for generating and sending timetable notificationstimetable.csv- Base timetable data with class schedules for each day ordertimetable_order.csv- Formatted timetable data for notificationsexam.csv- List of upcoming exams with datesday_order.txt- Tracks the current day orderrequirements.txt- Python dependencies.env- Environment variables for sensitive information (not tracked by Git).env.example- Example template for creating your own .env file.gitignore- Specifies files that Git should ignore
-
Clone the repository:
git clone https://github.com/cosmos-0118/autotimetable.git cd autotimetable -
Install required dependencies:
pip install -r requirements.txt
-
Configure your environment variables:
- Rename the
.env.examplefile to.env(or create a new.envfile) - Create a new bot using BotFather on Telegram
- Update the
TELEGRAM_BOT_TOKENin the.envfile with your bot token - Update the
TELEGRAM_CHAT_IDSin the.envfile with your comma-separated chat IDs
- Rename the
-
Customize your timetable:
- Update
timetable.csvwith your class schedule - Update
timetable_order.csvwith the formatted schedule - Update
exam.csvwith your upcoming exams - Customize the
items_to_bringdictionary intimetable_bot.py - Add holiday dates to the
holidaysdictionary
- Update
-
Run the script:
python timetable_bot.py
-
For automated daily notifications, set up a cron job or scheduled task:
# Example cron job to run daily at 6:00 AM 0 6 * * * cd /path/to/autotimetable && python timetable_bot.py
The Telegram notifications include:
- Current date and day order
- Complete timetable for the day
- Items to bring for the day
- Reminders for upcoming exams
- Special messages for holidays
- Edit
timetable.csvandtimetable_order.csvto match your class schedule - Update the
items_to_bringdictionary intimetable_bot.pyto customize daily items - Add or remove entries in the
holidaysdictionary to customize holiday messages - Add exam dates to
exam.csvfor automatic reminders
This project is open source and available under the MIT License.
Created by cosmos-0118