Sunday, January 30, 2005

The iCalendar Standard

After learning and developing on AppleScript for the CTMS, it seems that the AppleScript development platform does not support networking technologies. Automating processes through mulitple programs seems to be the aim of the scripting language. As time is running short, it is thought that using Java would be the best option, as I'm still not so familiar with Cocoa even after going through a few tutorials.

To get iCal's data into Java, the first thought was to interpret iCal's data using a Java filter. Luckily, the data was saved as the iCalendar format, which is detailed here: http://www.ietf.org/rfc/rfc2445.txt

By following the specification, a Java filter was written, this filter accepts an .ics files and picks out the important elements and outputs a text file.

The elements the filter picks out are:

TODO
X-WR-CALNAME
DTSTART
DTEND
DURATION
SUMMARY

These data will be neccessary to construct the total time of each category of events (ie. Time management).
Another idea is to retrieve these data from .Mac where the .ics file can be taken using iSync. However, there is no reason for us to do it, as a local copy can be obtained.