Files
studipsync/README.md
2025-11-14 21:37:55 +01:00

1.7 KiB

studip-sync

Command-line tool written in Rust (edition 2024) to sync files from the Stud.IP JSON:API to a local filesystem tree.
The repository contains the cargo project (with CLI/config/state scaffolding) plus an offline copy of the JSON:API documentation (in jsonapi/).

Current status

  • cargo binary crate scaffolded with name studip-sync, pinned to Rust edition 2024.
  • CLI implemented with auth, sync, and list-courses subcommands plus logging/verbosity flags.
  • Config/state loaders wired up with XDG path resolution, multi-profile support, and JSON/quiet/debug logging modes.
  • studip-sync auth prompts for credentials (or reads --username/--password / STUDIP_SYNC_USERNAME|PASSWORD) and stores the base64 Basic auth token in the active profile.
  • studip-sync list-courses now talks to the Stud.IP JSON:API, caches user/semester/course metadata, and prints a table of enrolled courses (with pagination + semester-key inference).
  • studip-sync sync walks courses → folders → file refs via the JSON:API, downloads missing or changed files (streamed to disk), and supports --dry-run / --prune cleanup.
  • Ready for further implementation of Stud.IP HTTP client, sync logic, and actual command behaviors.

Next steps

  1. Add configurable download concurrency plus richer progress/logging (per-course summaries, ETA) while keeping memory usage low.
  2. Implement smarter state usage (incremental filter[since] queries, resume checkpoints) and expand pruning to detect/cleanup orphaned state entries.
  3. Add tests and ensure cargo fmt + cargo clippy --all-targets --all-features -- -D warnings + cargo test pass (and wire into CI if applicable).