Skip to main content

Terminal-based timetable viewer for Gautam Buddha University

Project description

📅 GBU Timetable CLI

A terminal-based interactive timetable viewer for Gautam Buddha University, built with Python and Rich. Browse departments, select sections, save preferences, and view G1/G2 lab splits cleanly inside your terminal.


✨ Features

  • 🎯 Interactive keyboard-driven CLI
  • 🏫 Browse by School → Department → Code → Section
  • 💾 Save default section (auto-load on next run)
  • 🧪 Smart G1 / G2 lab stacking in the same period
  • ⏰ Automatic 12-hour AM/PM time slots
  • 🎨 Clean, readable UI using rich
  • ⚡ Zero configuration after first setup

📦 Installation

pip install gbu-timetable

Requires Python 3.8+


🚀 Usage

Run directly from terminal:

timetable

No flags, no arguments — fully interactive.


🧭 Navigation Controls

Key Action
1 View saved timetable
2 Browse & select section
3 Enter section ID directly
b Go back
m Return to main menu
q Quit

🗂️ Saved Configuration

Your selected section is stored locally at:

~/.timetable_cli.json

Example:

{
  "section_id": "1278",
  "section_name": "B.Tech CSE (A)"
}

This allows instant access next time using “View Saved Timetable”.


🧪 G1 / G2 Lab Handling

When multiple entries exist in the same period:

  • G1 and G2 are automatically detected
  • Displayed as stacked panels inside the same cell
  • Color-coded for quick differentiation

No manual filtering required.


🕒 Time Slot Logic

  • Default start time: 08:30 AM
  • Each period: 60 minutes
  • Automatically adapts to timetable length
  • Displayed in 12-hour format

Example:

P3
10:30 AM – 11:30 AM

🌐 Data Source

Timetable data is fetched from:

https://samay.mygbu.in/api.php

Data is fetched once per run for performance and simplicity.


🧱 Project Structure

gbu-timetable/
│
├── timetable/
│   ├── __init__.py
│   └── cli.py
│
├── pyproject.toml
├── README.md
└── LICENSE

🛠️ Development Setup

git clone https://github.com/shashaaankkkkk/gbu-timetable
cd gbu-timetable
pip install -e .

Run locally:

timetable

📚 Dependencies

  • requests
  • readchar
  • rich

Installed automatically via pip.


👨‍💻 Author

Shashank Shekhar Full Stack Developer & CLI Tool Builder

🔗 GitHub: https://github.com/shashaaankkkkk/


📄 License

MIT License — free to use, modify, and distribute.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gbu_timetable-0.1.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gbu_timetable-0.1.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file gbu_timetable-0.1.1.tar.gz.

File metadata

  • Download URL: gbu_timetable-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for gbu_timetable-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fd6b54d6bb1a1bfe280b12e8b85054994d8a8dfbc02067014996b5a1a684379d
MD5 aa63d1856bdb6b426ea00a16f1baaa04
BLAKE2b-256 b33bc07824b1adc5ddb858113ce791bd1626cbac3df0df9d40cdc2b1a154202f

See more details on using hashes here.

File details

Details for the file gbu_timetable-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gbu_timetable-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for gbu_timetable-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 57e51bc9af6b0d58fa6fffffefd88540593159b6d62bebcd066ab36cecd30a10
MD5 e8cc678928e9344906d1edda7ff6adae
BLAKE2b-256 2e6cdfd5b7e2841eb8a70b071934c86f720b66be13145e75e2132c546a421b12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page