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.4.tar.gz (5.5 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.4-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gbu_timetable-0.1.4.tar.gz
  • Upload date:
  • Size: 5.5 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.4.tar.gz
Algorithm Hash digest
SHA256 719e74322cb2dab33ec3ee5028c2c9a228e744395aedd8176b2ac17b44b4946e
MD5 9136f836df1a68d12e5d3f2762e82593
BLAKE2b-256 4aef2d2202ae16f51428444d060324c9a1df5b7807c025f6564dd6236acf2816

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gbu_timetable-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.0 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 45bf4fdd0dbc0ef47acbee2483bd6a34e35d08cab210e2cd13031f51d47128a2
MD5 bdf9a3f340fc22c8d619afa7e3fc0619
BLAKE2b-256 59ee895115273d37d32b71d31e540ade35de64409d9c656f123ceccb59c7d5f0

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