emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] iCal Import


From: Rick Moynihan
Subject: Re: [Orgmode] iCal Import
Date: Wed, 20 Jun 2007 12:59:38 +0100
User-agent: Thunderbird 2.0.0.4 (X11/20070604)

I'm quite excited by the Google calendar/iCal integration. I had previously written a simple Ruby script (I really need to learn elisp) to parse an org-mode file for dates and schedule some "at" jobs to fire another script to fire events into Twitter, which I was subsequently using as a free SMS reminder service.

It worked quite well in simple tests, but I've never bothered to develop it further, primarily because it occured to me that google calendar supports free SMSing of notifications and that this could potentially be tied into org-mode with the g-client code.

It seems that your code is about getting gcal into org-mode where as the above would require the reverse. Obviously the ideal would be to have some level of two-way Calendar synchronisation. Though this might be far too complex and messy, how about allowing some kind of emacs based copy/paste between them (in both directions)?

The thought of managing myself in org-mode and syncing to Gcal when I want to share/expose my calendar to others is a tempting proposition; I imagine this coupled with SMS reminders would be great.

Anyway, as my elisp skills are no more advanced than being able to copy and paste fragments of elisp; I thought I'd post my ideas to see whether anyone else finds them interesting enough to implement.

R.

Tim O'Callaghan wrote:
HI,

below is a bit of a hack i've come up with to attempt to read my
google calendar into my org agenda. I originally started it using
eldav, but i realised i don't have a webdav server to sync to. At the
moment, It only works for entries that icalendar-import-file converts
to %%(add something).

The org docs imply that that is the only diary entry type that it can
process, is this the case?

Tim.

--- code snip ---
(require 'w3)
(require 'icalendar)

(setq google-ical-org-list
     '(
       ("http://www.google.com/calendar/ical/basic.ics";
        "~/gettingThingsDone/CalendarPersonal.ics"
        "~/gettingThingsDone/CalendarPersonal.org")
       ("http://www.google.com/calendar/ical/basic.ics";
        "~/gettingThingsDone/CalendarShared.ics"
        "~/gettingThingsDone/CalendarShared.org")
       ))

(defun toc:goggle-to-org ()
 "get a google calendar and convert it into org dates"
 (interactive)
 (with-temp-buffer
   (let* ((glist google-ical-org-list))
     ;; iterate through list
     (while (setq entry (pop glist))
       (setq google-ical-url (car entry) local-ical-file (nth 1
entry) local-date-file (nth 2 entry))
       ;; Delete the diary local files
       (if (file-exists-p local-ical-file) (delete-file local-ical-file))
       (if (file-exists-p local-date-file) (delete-file local-date-file))
       ;; Get ical file
       (w3-download-url google-ical-url (expand-file-name local-ical-file)
      ;; convert to diary without leading &
       (icalendar-import-file local-ical-file local-date-file nil)
      ;; iCalendar leaves the buffers open
       (kill-buffer (find-buffer-visiting local-date-file))
       (kill-buffer (find-buffer-visiting local-ical-file))
       ))))
--- code snip ---


_______________________________________________
Emacs-orgmode mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



--
Rick Moynihan
Software Engineer
Calico Jack LTD
http://www.calicojack.co.uk/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]