emacs-wiki-discuss
[Top][All Lists]
Advanced

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

[emacs-wiki-discuss] Re: Planner-diary rss?


From: Chris Lowis
Subject: [emacs-wiki-discuss] Re: Planner-diary rss?
Date: Thu, 21 Apr 2005 11:54:21 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Clair Ching wrote:
Hi, everyone!

I am wondering if there is a way for planner-diary entries to be made
into rss?  It would be really nifty to have such a thing =)

I have seen friends who have this calendar on their blogs and you
could see their activities so you could easily find out when they are
busy.  In my case, so that they would know when I am busy and/or free.


Hi,

Sacha asked me to document my setup, hope it's useful to you. I'd like to say thanks to Ulf Jasper for his help .

You will need

- Ulf Jasper's icalendar.el (http://de.geocities.com/ulf_jasper/emacs.html)
- phpicalendar on a webserver for publishing (http://sourceforge.net/projects/phpicalendar/) - (optional) sitecopy for automatically pushing files via ftp to a webserver (http://www.lyra.org/sitecopy/)

Firstly add this to the end of your emacs diary

<example>
   # Local Variables:
   # after-save-hook: (crl/diary-export)
   # End:
</example>

This causes the function crl/diary-export to be called on save (as
there is, as far as I know, no diary-after-save-hook). Thanks to Ulf
Jasper for this tip.

Then something like this should be added to your .emacs :

<example>
(defun crl/diary-export ()
  (save-excursion
    (set-buffer (find-file-noselect "~/calendar/diary.ics" t))
    (erase-buffer)
    (icalendar-export-file "~/diary" "~/calendar/diary.ics")
    (when desktop-p
      (shell-command "/usr/local/bin/sitecopy --update diary")
      )
    )
  )
</example>

This snippet publishes the diary to the folder ~/calendar/diary.ics as
an icalendar file, and uses sitecopy to push the file to the
webserver. At the moment the save-excursion doesn't seem to work on my
emacs. Any suggestions appreciated !

On the server, or your local machine if you have apache/php
etc. installed, use phpicalendar to publish the icalendar file as a
webpage. This also generates an RSS feed. You will need to set up
sitecopy (or scp for example) to put the diary.ics file in the
phpicalendar "calendars" directory.

You end up with something that looks like this (check out the link to
RSS feeds) : http://acm.cs.uic.edu/calendar/ical/month.php


Kind regards,

Chris






reply via email to

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