aboutsummaryrefslogtreecommitdiff
path: root/calendar-sync.local.el.example
blob: c4646659c860fd51f5d1652a5e7043e48ef082e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;;; calendar-sync.local.el.example --- Template for private calendar config -*- lexical-binding: t; -*-

;; Copy this file to `calendar-sync.local.el' (sibling of init.el) and
;; replace the placeholders with your actual private ICS feeds. The real
;; file is gitignored; the template is tracked.
;;
;; How it works:
;; - `modules/calendar-sync.el' defines `calendar-sync-private-config-file'
;;   defaulting to ~/.emacs.d/calendar-sync.local.el.
;; - At the bottom of that module, `calendar-sync--load-private-config'
;;   calls `load' on that path if readable. Missing file = silent no-op,
;;   and `calendar-sync-now' prints "No calendars configured".
;; - `user-constants' is required earlier in init.el, so `gcal-file',
;;   `pcal-file', and `dcal-file' are bound when this file is evaluated.
;;
;; Two ways to give each .ics calendar its feed URL:
;;   :secret-host - PREFERRED. An auth-source host whose secret holds the
;;                  feed URL, looked up in ~/.authinfo.gpg (encrypted at
;;                  rest, and distributed with your other authinfo entries).
;;                  The .ics URL is itself a secret token, so it belongs in
;;                  the encrypted store. Add a line like:
;;                    machine calendar-google login me password https://...ics
;;   :url         - the feed URL inline (plaintext in this file). If both
;;                  are set, :url wins.
;;
;; Where to find the private .ics URL:
;; - Google Calendar: Settings -> Your Calendar -> Integrate calendar ->
;;   "Secret address in iCal format" (regenerate if leaked).
;; - Proton Calendar: Settings -> Import/Export / Share -> "Share with
;;   anyone (via link)" -> copy the .ics URL.

(setq calendar-sync-calendars
      `((:name "google"
         :secret-host "calendar-google"
         :file ,gcal-file)
        (:name "proton"
         :secret-host "calendar-proton"
         :file ,pcal-file)
        (:name "deepsat"
         :secret-host "calendar-deepsat"
         :file ,dcal-file)))

(provide 'calendar-sync.local)
;;; calendar-sync.local.el.example ends here