# Bakaláři CLI
<div align=center>

  <img width="800" height="695" alt="image" src="https://github.com/user-attachments/assets/0b44495e-a3b8-4036-8b63-f8782cb89310" />

Terminal timetable viewer for the Bakaláři school system.  
A TUI (Terminal User Interface) application built with [Textual](https://textual.textualize.io/).

</div>

## Installation

The recommended way to install **bakalari-cli** is using [uv](https://docs.astral.sh/uv/) or [pipx](https://github.com/pypa/pipx):

```bash
# Using uv (fastest)
uv tool install bakalari-cli

# Using pipx
pipx install bakalari-cli

# Using standard pip (fallback)
pip install bakalari-cli
```

## Usage

1. Run the application:
   ```bash
   bakalari
   ```

2. Enter your Bakaláři timetable URL, e.g.:
   ```
   https://bakalar.skola.cz/Timetable/Public/Permanent/Class/FF
   ```

3. Navigate the timetable:
   - **Arrow keys**: Move between cells
   - **Shift+Left/Right**: Switch between week types
   - **R**: Refresh
   - **Q**: Quit

## URL Format

```
https://<school_bakalari_url>/Timetable/Public/<Type>/<EntityType>/<ID>
```

| Type | Description |
|------|-------------|
| `Permanent` | Fixed schedule (stálý rozvrh) |
| `Actual` | Current week with changes |
| `Next` | Next week |

| EntityType | Description |
|------------|-------------|
| `Class` | Class timetable |
| `Teacher` | Teacher timetable |
| `Room` | Room timetable |

## Development

This project uses [uv](https://docs.astral.sh/uv/) for development.

```bash
# Clone the repository
git clone https://github.com/axo4xo/bakalari-cli.git
cd bakalari-cli

# Install dependencies and setup environment
uv sync

# Run the app
uv run bakalari

# Run tests
uv run pytest
```

### Textual Development
To run with the Textual developer console:
```bash
uv run textual run --dev bakalari_cli.app:BakalariApp
```

