updating modes and structures

This commit is contained in:
2026-04-02 11:27:11 +01:00
parent 9d0c74547f
commit a5983242f9
258 changed files with 1424 additions and 95 deletions

66
Linux/20250727120306-nextcloud.org Normal file → Executable file
View File

@@ -218,3 +218,69 @@ Im thinking of having this as our shared calendar and file system. The only user
** Connecting to IOS
https://www.reddit.com/r/NextCloud/comments/1pehpft/calendar_app_for_ios/
* ICS stuff:
** To get the ID of a calendar subscription:
#+begin_src
zaine@zaine-HP-ProDesk-400-G1-SFF [14:14:27] [~]
-> % docker exec nextcloud-app-1 php occ dav:list-subscriptions zaine
+-----------------------+-----------------------+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| URI | Displayname | Refresh rate | Source |
+-----------------------+-----------------------+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
| outlookoffice365com-1 | outlook.office365.com | PT5M (default) | https://outlook.office365.com/owa/calendar/b910ea835e414663831e505f3d10baa2@microlise.com/d2568a0134fb49af92d39c1669c4729317662288011094411305/calendar.ics |
+-----------------------+-----------------------+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
#+end_src
** emacs config to sync calendars:
#+begin_src
(require 'org-caldav)
(require 'url)
(require 'icalendar)
(modify-coding-system-alist 'file "caldav-work\\.org\\'" 'utf-8-unix)
(defvar my/outlook-ics-url
"https://outlook.office365.com/owa/calendar/b910ea835e414663831e505f3d10baa2@microlise.com/d2568a0134fb49af92d39c1669c4729317662288011094411305/calendar.ics")
(defvar my/outlook-org-file
"D:\\_nextcloud\\master-folder\\org_files\\calendar\\caldav-work.org")
(defvar my/ics-python-script
"D:\\_nextcloud\\master-folder\\org_files\\calendar\\ics_to_org.py")
(defun my/sync-outlook-calendar ()
"Fetch and expand Outlook ICS (including recurrences) into org file."
(interactive)
(message "Syncing Outlook calendar...")
(let* ((cmd (format "python \"%s\" \"%s\" \"%s\""
my/ics-python-script
my/outlook-ics-url
my/outlook-org-file))
(result (shell-command-to-string cmd)))
(message "Outlook calendar sync: %s" (string-trim result))))
;; Sync on startup and every 30 minutes
(my/sync-outlook-calendar)
(run-with-timer (* 30 60) (* 30 60) #'my/sync-outlook-calendar)
;; --- CalDAV for native Nextcloud calendars ---
(setq org-caldav-url "https://nextcloud.zainezq.com/remote.php/dav/calendars/zaine/")
(setq org-caldav-calendars
'((:calendar-id "personal"
:inbox "D:\\_nextcloud\\master-folder\\org_files\\calendar\\caldav-personal.org"
:files nil)
(:calendar-id "zxh"
:inbox "D:\\_nextcloud\\master-folder\\org_files\\calendar\\caldav-family.org"
:files nil)))
;; --- Agenda files ---
(setq org-agenda-files
'("D:\\_nextcloud\\master-folder\\org_files\\calendar\\caldav-personal.org"
"D:\\_nextcloud\\master-folder\\org_files\\calendar\\caldav-work.org"
"D:\\_nextcloud\\master-folder\\org_files\\calendar\\caldav-family.org"
"D:\\_nextcloud\\master-folder\\org_files\\org_roam\\Books\\20250724230557-books_org_agenda.org"))
#+end_src