#246: View for rendering events as an iCalendar file

Contents
  1. Motivation
  2. Proposal
  3. Progress log
  4. Participants
by Alex Limi last modified Jan 21, 2010 07:29 AM

Make it possible to subscribe to Plone events in the standard iCalendar format.

Proposed by
Andi Zeidler
Seconded by
Alexander Limi
Proposal type
Architecture
Assigned to release
Repository branch
plip246-ical-feed
State
completed

Motivation

At the moment, Plone doesn't offer any way to subscribe to events. Currently, you can only make a copy of a single event in your calendar.

Classic examples are the plone.org events and training calendars. We'd like to be able to add these to iCal, Google Calendar, Outlook, Sunbird and other applications that support the iCalendar standard. Right now we are offering up these in RSS format, but they make much more sense as a calendar you can subscribe to (and activate/deactivate in your calendaring application).

Proposal

We propose creating a view that will pick up any event in a given folder (and its subfolders), and render these in the iCalendar format. This view is added to ATContentTypes.

Progress log

Currently implemented with tests on the aforementioned branch. A review bundle is provided at http://svn.plone.org/svn/plone/review/plip246-ical-feed/

Participants

Andreas Zeidler

Comments (7)

Martijn Pieters Oct 26, 2008 05:28 PM
+1
Danny Bloemendaal Oct 27, 2008 03:57 PM
+1
Andreas Zeidler Oct 27, 2008 11:50 PM
abstaining as i proposed this PLIP myself (well, sort of anyway :))
Raphael Ritz Oct 28, 2008 10:47 AM
+1
Tom Lazar Jan 06, 2009 02:08 PM
+1
Tom Lazar Jan 30, 2009 05:56 PM
On the whole this implementation looks fine to me. The following issues came
up during my review, none of which are showstoppers, though, IMO.

The test consisted of a review of the changes made to ATContentTypes [1] and a
manual test of a local instance of the buildout. That test was performed under
Mac OS X 10.5.6 with Python 2.4.6 and Apple's iCal as calendar application.

After adding an event to the existing 'events' folder of a new Plone instance,
I attempted to access the following URL:

`http://localhost:8080/plone246/events/calendar.ics`

This however, resulted in a 404. It turned out, that the view was only
registered for IATFolder and IPloneSiteRoot, but not for `Large Plone Folder`
a.ka. IATBTreeFolder. I took the liberty of fixing this myself [2] ;-) and it
worked as expected.

I then subscribed to that URL in iCal. The calendar was empty, which was to be
expected, as I hadn't published the event yet. I did so and hit 'refresh' in iCal.
Voila! The even appeared. Most of the information entered into the event appeared
in iCal however, multi-day events should be marked as 'all-day' - but that's
actually a limitation of ATCT's .ics implementation and not within the scope of
this PLIP.

I then added another event, published it and hit refresh in iCal again and the
event turned up as expected.

From my perspective, there are only two issues remaining:

 * the cache key doesn't need to include the negotiated browser language since
   the output, i.e. the ical data, isn't i18n-aware. (i.e. just merge the existing
   solution to this from http://dev.plone.org/collective/changeset/79467)

 * the calendar view should include the Title and description of the containing
   folder. Currently this is not the case and iCal defaults to `Untitled` for
   the title and to an empty description.

Tom Lazar

--

[1] http://dev.plone.org/collec[…]2Fplip246-ical-feed%4073834
[2] http://dev.plone.org/collective/changeset/80008
Andreas Zeidler Jan 30, 2009 08:48 PM
good point (re title) and nice catch wrt large folders. but hey, where's the test? ;)