- From: Dan Connolly <connolly@w3.org>
- Date: Fri, 06 Feb 2004 01:26:50 -0600
- To: www-rdf-calendar@w3.org
As we discussed on Wednesday, ical2rdf.pl is so crufty that none of us likes to maintain it very much. "Plan to throw the first one away - you will anyway" (Fred Brooks). Now that I understand iCalendar data better, I managed to code up the basic structure that I designed while brushing my teeth and such... http://www.w3.org/2002/12/cal/icalWebize.py v 1.3 2004/02/06 07:13:24 It doesn't work well enough to pass any of the tests yet; it needs support for non-text properties, like dates, before it'll do anything really interesting. But unlike ical2rdf.pl where iterating over lines dominated the whole program, icalWebize.py has a nice stepwise design for dealing with iCalendar data: - contentLines(fp) does line folding and calls parseLine() to break up name/params/value - findComponents() builds a nested list of components - doCalendarObject serializes properties and subcomponents as RDF/XML - doEvent likewise ... and so on. For output, I'm using a sax-based XML writer from the python-xml package. I'm not sure I'm happy with it, but the sax interface is pretty stable and I'm sure it would be easy to slot in something better. I could use an RDF serializer, but that seems like overkill. -- Dan Connolly, W3C http://www.w3.org/People/Connolly/ see you at the W3C Tech Plenary in Cannes 1-5 Mar 2003?
Received on Friday, 6 February 2004 02:26:58 UTC