Created
September 14, 2021 11:51
-
-
Save 4DA/c991179645547ce2a4d809f9df01d048 to your computer and use it in GitHub Desktop.
sync org files with caldav (one way)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/emacs --script | |
;; config | |
;; storing creds in authinfo | |
;; https://github.com/dengste/org-caldav#storing-authentication-information-in-authinfonetrc | |
;; MELPA and use-package stuff ------------------------------------------------- | |
(require 'package) | |
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) | |
(package-initialize) | |
(eval-when-compile | |
(require 'use-package)) | |
;; ----------------------------------------------------------------------------- | |
(use-package org-caldav | |
:ensure t | |
:config | |
(progn | |
(setq org-caldav-url | |
"https://caldav.fastmail.com/dav/calendars/user/") | |
(setq org-caldav-calendar-id "") | |
(setq org-caldav-inbox (expand-file-name "~/orgzly/inbox.org")) | |
(setq org-caldav-files (mapcar 'expand-file-name `("~/orgzly/todo.org"))) | |
(setq org-caldav-sync-direction 'org->cal))) | |
(setq org-icalendar-include-todo 'all | |
org-icalendar-use-deadline '(event-if-not-todo todo-due) | |
org-icalendar-use-scheduled '(todo-start event-if-todo event-if-not-todo) | |
org-icalendar-with-timestamps t) | |
;; does all the work | |
(org-caldav-sync) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment