Automates room booking on tp.educloud.no using Playwright. MFA is done manually on first run; session is reused after that.
uv sync
uv run playwright install chromiumEdit config.yaml with your NTNU username and preferences (see profiles section inside).
Set Gmail credentials as env vars for notifications (optional):
export GMAIL_TO=you@gmail.com
export GMAIL_APP_PASSWORD=xxxxuv run koker login # authenticate (Feide + MFA, manual)
uv run koker warm # refresh the saved session without booking
uv run koker book # book rooms per config.yaml
uv run koker book --config config.yaml # explicit config
uv run koker rooms # list available rooms matching config criteria
uv run koker status # list active bookings
uv run koker cancel --count 2 # cancel N active bookings
uv run koker cancel --all
uv run koker gcal-auth # one-time Google Calendar OAuth setupSession saved to data/storage_state.json. Re-run koker login when session expires (~2 weeks). If running via systemd timer, you'll get an email alert when it expires.
cp systemd/koker-book.service ~/.config/systemd/user/
cp systemd/koker-book.timer ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now koker-book.timerUses config-daily.yaml (rolling 14-day window). Edit that file separately from config.yaml.
- Max 4 hours per booking
- Max 8 bookings in a rolling 2-week window
- Booking window opens 14 days ahead
- Hours: 08:00-23:00