Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Variables

Plain KEY=value file. The first location that exists wins:

  1. --config <path>, or BAKASYNC_ENV_FILE
  2. .env.local and .env in the working directory
  3. ~/.config/bakasync/config.env, or %APPDATA%\bakasync\config.env

Quote a value with a space: BAKASYNC_GROUPS="S1, PX2". A leading ~ expands.

VariableRequiredDefaultMeaning
BAKASYNC_BASE_URLyesRoot of the Bakaláři web, e.g. https://bakalari.example.cz/bakaweb
BAKASYNC_CLASS_IDyesId from the timetable URL
BAKASYNC_CALENDAR_IDyesTarget calendar, …@group.calendar.google.com
BAKASYNC_SERVICE_ACCOUNT_KEYnobeside the configPath to the JSON key
BAKASYNC_WEEKSnoActual,NextWeeks to scrape
BAKASYNC_EXPECTED_CLASS_NAMEnoWarn if the page shows another class
BAKASYNC_GROUPSnoYour split groups, comma separated
BAKASYNC_MERGE_GAP_MINUTESno25Break that still merges two lessons
BAKASYNC_INTERVALno10min, 1h, 600s
BAKASYNC_DRY_RUNnofalseLog the plan, write nothing
BAKASYNC_DUMP_HTML_DIRnoSave every fetched page here
RUST_LOGnoinfotracing filter

Groups

BAKASYNC_GROUPS=S1,PX2 keeps those groups. Whole-class lessons are always kept. Matching ignores case, diacritics and the long form, so S1 matches S1 - Skupina 1.

Key path

An unset key path means service-account.json next to the config file. A relative path resolves from there too. With no config file at all, under systemd or in a container, every variable comes from the environment and the key path is required.

The key is a credential. Keep it chmod 600 and out of any repository. .env and .env.local are gitignored, and a pre-push hook refuses a real school host.