Skip to content

Cosmos-0118/autotimetable

Repository files navigation

AutoTimetable

A Python-based automated timetable notification system that sends daily class schedules and reminders via Telegram.

📝 Overview

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.

✨ Features

  • 📅 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

🛠️ Requirements

  • Python 3.6+
  • Required packages:
    • pandas
    • requests
    • python-dateutil
    • pytz

All dependencies can be installed using the provided requirements.txt file.

📋 File Structure

  • timetable_bot.py - Main script for generating and sending timetable notifications
  • timetable.csv - Base timetable data with class schedules for each day order
  • timetable_order.csv - Formatted timetable data for notifications
  • exam.csv - List of upcoming exams with dates
  • day_order.txt - Tracks the current day order
  • requirements.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

🚀 Setup & Usage

  1. Clone the repository:

    git clone https://github.com/cosmos-0118/autotimetable.git
    cd autotimetable
  2. Install required dependencies:

    pip install -r requirements.txt
  3. Configure your environment variables:

    • Rename the .env.example file to .env (or create a new .env file)
    • Create a new bot using BotFather on Telegram
    • Update the TELEGRAM_BOT_TOKEN in the .env file with your bot token
    • Update the TELEGRAM_CHAT_IDS in the .env file with your comma-separated chat IDs
  4. Customize your timetable:

    • Update timetable.csv with your class schedule
    • Update timetable_order.csv with the formatted schedule
    • Update exam.csv with your upcoming exams
    • Customize the items_to_bring dictionary in timetable_bot.py
    • Add holiday dates to the holidays dictionary
  5. Run the script:

    python timetable_bot.py
  6. 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

📱 Notification Format

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

🔧 Customization

  • Edit timetable.csv and timetable_order.csv to match your class schedule
  • Update the items_to_bring dictionary in timetable_bot.py to customize daily items
  • Add or remove entries in the holidays dictionary to customize holiday messages
  • Add exam dates to exam.csv for automatic reminders

📄 License

This project is open source and available under the MIT License.

👨‍💻 Author

Created by cosmos-0118

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages