docs: clarify dirs and since flag

This commit is contained in:
2025-11-14 22:28:26 +01:00
parent 50c74438a8
commit c12310efca
2 changed files with 9 additions and 8 deletions

View File

@@ -37,12 +37,13 @@ This document equips future agents with the current mental model for the `studip
- Normalizes path components and uses `NameRegistry` to avoid collisions, guaranteeing human-readable yet unique names.
- Checks file state (size, modified timestamp, checksum) against `state.toml` to skip unchanged files; downloads stream to `*.part` before rename.
- Records remote metadata + local path hints in state. `--dry-run` reports actions without touching disk; `--prune` (plus nondry-run) deletes stray files/dirs with `walkdir`.
- `--since <ISO8601>` is accepted for future incremental sync work; at the moment it is recorded in logs/state but no API filters are issued.
5. HTTP errors propagate via `anyhow`, but 401/403 currently surface as generic failures—production UX should point users to `studip-sync auth`.
## Configuration & State
- Config path: `${XDG_CONFIG_HOME:-~/.config}/studip-sync/config.toml`. Example keys: `base_url`, `jsonapi_path`, `basic_auth_b64`, `download_root`, `max_concurrent_downloads`.
- State path: `${XDG_DATA_HOME:-~/.local/share}/studip-sync/state.toml`.
- Config path: `${XDG_CONFIG_HOME:-~/.config}/studip-sync/config.toml`. Override with `--config-dir` when needed. Example keys: `base_url`, `jsonapi_path`, `basic_auth_b64`, `download_root`, `max_concurrent_downloads`.
- State path: `${XDG_DATA_HOME:-~/.local/share}/studip-sync/state.toml`. `--data-dir` relocates this tree (and the default `downloads/` folder). Explicitly setting `download_root` decouples downloads from the data dir; otherwise it defaults to `<data-dir>/downloads`.
- `profiles.<name>.user_id` caches `/users/me`.
- `profiles.<name>.semesters.<key>` stores semester IDs/titles/keys.
- `profiles.<name>.courses.<id>` keeps display names + `last_sync`.