A Rust library that watches ICS calendar files. You give ICS Watcher a URL pointing to an .ics calendar file and it will poll for changes at regular intervals. When changes are detected, your callback functions get called with details about what changed.
- Log all events: pass
log_eventsas one of the callbacks - TUM to Google Calendar Proxy: pass
tum_google_syncas one of the callbacks- This is already implemented in
main.rswhich means, you can create a.envwith yourTUM_URLandGOOGLE_CALENDAR_ID, put your Google Calendar API client secret in.secrets/client_secret.jsonand start syncing :) - Unlike https://github.com/TUM-Dev/CalendarProxy/, events in this implementation can be modified (which is the main reason for creating this crate)
- This is already implemented in
- TUM to Apple Calendar Proxy: pass
tum_apple_syncas one of the callbacks- Behaves just like the Google sync, but talks CalDAV to iCloud instead
- Also implemented in
main.rs: addAPPLE_ID,APPLE_APP_PASSWORDandAPPLE_CALENDAR_NAME(the name of the calendar as shown in the Apple Calendar app) to your.envand start syncingAPPLE_APP_PASSWORDhas to be an app-specific password, your regular Apple ID password won't be accepted- If you'd rather skip the calendar discovery, set
APPLE_CALENDAR_URLto the CalDAV collection instead ofAPPLE_CALENDAR_NAME - Not sure how your calendar is named?
list_icloud_calendarsreturns all of them
- Want your exams in a color of their own? Apple Calendar only colors whole calendars, not single events - set
APPLE_EXAM_CALENDAR_NAME(orAPPLE_EXAM_CALENDAR_URL) and exams (events with "Prüfung" in their title) go into that calendar insteadics-watcher sort-examsmoves the exams that are in the main calendar already - it only shows what it would move, until you run it with--apply- Events stay in whichever calendar they are, so you can still move them around by hand
GOOGLE_CALENDAR_IDand the Apple variables are independent - configure one of them or both to sync to both calendars at onceAppleCalendar::connect_toworks with any other CalDAV server (Fastmail, Nextcloud, Radicale, …) as well
Has the Google sync been running for a while? ics-watcher migrate copies that calendar over to the Apple Calendar, so that the Apple sync can take over:
- Events created by the Google sync keep their uid, so the Apple sync picks up right where the Google sync left off
- Whatever you changed in Google Calendar comes along (notes, a seat number in the location, reminders, colors), and events you deleted there stay deleted
- Events you added to the calendar yourself are copied as well, recurring ones included
- Nothing is deleted, neither in Google nor in the Apple Calendar, and events that are in the Apple Calendar already are skipped
Configure both calendars in the .env, stop the watcher and run the migration in the watcher's folder (it needs .secrets and .backups):
ics-watcher migrateshows what would happen without writing anything ---dump <folder>additionally saves every event as an.icsfile to look atics-watcher migrate --applywrites to the Apple Calendar- With an exam calendar,
ics-watcher sort-exams --applymoves the exams over into it - Remove
GOOGLE_CALENDAR_IDfrom the.envand start the watcher again
- TUM Sync
- Refactor TUM Sync creation and deletion of events
- Introduce reminders for exams
- Fix the examples in the docs (they work, they just don't pass the docs tests because they're async)
Licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
The TUM Google / Apple Sync can also function as a summary shortener using the replacements.json. Due to licensing restrictions, I do not distribute it myself, but you can find a good replacements.json here: https://github.com/TUM-Dev/CalendarProxy.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.