[Vobject] vobject.iCalendar to tree

tsr tsr.offentlig at tsr.se
Wed Feb 10 04:52:41 CST 2010


Nvm, I figured it out, seems vobject actually does what I want.

(Honestly I just gave it a quick look before posting, my apologies)

/tsr

El mié, 10-02-2010 a las 09:56 +0100, tsr escribió: 
> Hi,
> 
> [preamble]
> I've been thinking alot lately about iCalendar for printing and the
> currently best idea I have so far is creating an xml-representation that
> can be parsed through an xslt-stylesheet into svg.
> 
> In my continuing process to actually get myself into python I've decided
> to make the ical2xml in python.
> 
> I've found a current ietf-draft about ical2xml that I will (with some
> modifications) implement.
> 
> On to my question...
> [/preamble]
> 
> Is there an already implemented function (or best practice) to get an
> iCalendar-object as a tree-object using vobject?
> 
> So that each component is separated into sub-components.
> 
> example:
> ical
>     vcal
>         vevent
>             valarm
>            /valarm
>         /vevent
>         vevent
>         /vevent
>     /vcal
>     vcal
>         vjournal
>         /vjournal
>         vjournal
>         /vjournal
>     /vcal
> /ical
> 
> instead of:
> ical
> vcal
> vevent
> valarm
> /valarm
> /vevent
> vevent
> /vevent
> /vcal
> vcal
> vjournal
> /vjournal
> vjournal
> /vjournal
> /vcal
> /ical
> 
> So that accessing a trigger in the above valarm would be something like:
> 
> ical.vcal[0].vevent[0].valarm.property['trigger']
> 
> And there would be no other path to it.
> 
> The problem I'm having with the current libraries (both vobject and
> icalendar) is that I can't figure out how to get the objects in
> tree-form instead of inlined.
> 
> It is not that hard to write a parser-function to do this, it just seems
> that I shouldn't have to. I think I just don't understand the
> vobject-library fully.
> 
> Can I have some enlightenment please.
> 
> /tsr
> 
> _______________________________________________
> VObject mailing list
> VObject at lists.skyhouseconsulting.com
> http://lists.skyhouseconsulting.com/mailman/listinfo/vobject




More information about the VObject mailing list