No description
- Rust 99.5%
- Shell 0.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
feat: implement Untis to Google Calendar sync and GTK4 settings app
Add a lightweight Rust workspace consisting of `untis-core`, `untis-sync`,
and `untis-settings` for Linux/KDE (`systemd --user`):
- untis-core:
- WebUntis client supporting username/password (Classic JSON-RPC with
automatic Mobile API fallback) and Untis Mobile TOTP / `untis://` QR URIs
- Lesson planner that merges seamless consecutive periods (same subject,
teacher, room, and status), marks cancellations in red and changes in
green, and bundles homework per due date into all-day events
- Google OAuth 2.0 desktop PKCE login (`credentials.json` import, token
refresh) and idempotent hash-diff calendar sync preserving manual and
past events
- Range-based calendar cleanup (`delete_all_events_in_range`)
- Credential storage via KDE Wallet / Secret Service (`oo7`) with optional
`chmod 600` file backend and migration
- `systemd --user` oneshot service/timer generator (startup sync plus
optional periodic interval)
- untis-sync:
- Headless background binary (`--background`, `--manual`, `--dry-run`)
with silent success/offline handling and `notify-send` error alerts
- untis-settings:
- Standalone GTK4 + libadwaita GUI for Untis/Google configuration,
calendar selection and cleanup, sync ranges, custom reminders,
systemd autostart, and status/log inspection
- Add `install.sh`, `.desktop` entry, `README.md`, and unit tests
|
||
| assets | ||
| crates | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| install.sh | ||
| README.md | ||
Untis → Google Calendar Sync (Rust, Linux/KDE)
Ressourcenschonende Synchronisation deines WebUntis-Stundenplans und deiner Hausübungen mit Google Calendar.
Aufbau
untis-sync: Schlankes, kopfloses Hintergrund-Binary ohne GUI-Abhängigkeiten. Läuft persystemd --user-Timer beim Systemstart (optional auch im Intervall), synchronisiert einmalig und beendet sich sofort wieder (0 MB RAM im Leerlauf).untis-settings: Eigenständige native GTK4 + libadwaita Einstellungs-App für Untis-Zugang, Google OAuth 2.0, Kalender-Auswahl, Zeitraum, Erinnerungen, Autostart und Status/Log.
Features
- Doppel- & Mehrfachstunden: Nahtlos aufeinanderfolgende Stunden ohne Pause dazwischen werden bei identischem Fach, Lehrer, Raum und Status zu einem gemeinsamen Block zusammengeführt (z. B. 100 Min. statt 2×50 Min.).
- Farbliche Markierung:
- Normale Stunden: Standard-Kalenderfarbe
- Entfall: Rot (
[ENTFALL] <Fach>, Status „Frei“, ohne Erinnerung) - Änderungen (Vertretung, Raum-/Lehrerwechsel, Prüfung, Sonderstunde): Grün
- Hausübungen: Alle Hausübungen mit demselben Fälligkeitstag werden in einem kompakten Ganztagestermin gebündelt (
HÜ: Mbzw.HÜ (3): M, D, E; Präfix✓wenn alle erledigt). - Eigene Erinnerungen: Getrennt für Stundenplan (z. B. 10 Min. vorher) und Hausübungen (z. B. Vortag 18:00) einstellbar.
- Sicher: Zugangsdaten standardmäßig verschlüsselt im KDE Wallet / Secret Service (
oo7), optional umschaltbar auf lokale Datei mitchmod 600. - Nicht-destruktiv: Vergangene Termine (vor heute 00:00) sowie manuell erstellte Termine bleiben vollständig unangetastet.
Installation
./install.sh
Danach „Untis Calendar Einstellungen“ im KDE-Startmenü oder KRunner öffnen.
Google Cloud OAuth 2.0 Einrichtung
- In der Google Cloud Console ein neues Projekt anlegen und die Google Calendar API aktivieren.
- Unter OAuth-Zustimmungsbildschirm (External) den App-Namen eintragen.
Wichtig: Veröffentliche den App-Status auf „In Produktion“ (oder füge dich als Testnutzer hinzu – im Testmodus laufen OAuth-Refresh-Tokens nach 7 Tagen ab).
- Unter Anmeldedaten eine OAuth-Client-ID vom Typ Desktop-App erstellen und die JSON-Datei herunterladen.
- In
untis-settingsunter Google Calendar die Datei über „credentials.json importieren…“ laden und auf „Mit Google anmelden“ klicken.
WebUntis-Zugang
- Standard: Server-URL (z. B.
hepta.webuntis.com), genauer Schulname, Benutzername und Passwort. - Fallback (bei SSO / 2FA): Auf „QR-Code / App-Secret“ umstellen und den
untis://setschool?...-Link aus dem Untis-Profil (Freigaben / Mobiler Zugriff) einfügen.