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.0.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.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gbu_timetable-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 dd8d22feacac4e6c84be874cd7a72f055aa8be08aff1e5663956a7726018c63c
MD5 4ef151fbf2502aa0e0607fb545d08c04
BLAKE2b-256 709b9a4579df68ac7b7bb0643cfb330fbc60a24a948fb401e91dc5ef16649dad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbu_timetable-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f4cc0180c5a1f851fdeb9e60900dff6757c64acec27cd18fdcb366924efc3de
MD5 e468e507974fb098383b3acecce46108
BLAKE2b-256 3c921f99095b02148beae65fb9eddc600e4bec5fe0a4cf922d5b3165d14dcc33

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