Jeffrey and I had chatted briefly about chandler2's relationship to vobject. I'm not sure how to proceed along those lines so I'm asking for suggestions.
It might be neat to be able to work with a Chandler2 Event() as a vobject. Something like: ----- from chandler.core import Item from chandler.event import Event from chandler.time_services import TimeZone item = Item() event = Event(item).add() cinco_de_mayo = datetime(2008, 5, 5, 18, tzinfo=TimeZone.pacific) event.base_start = cinco_de_may print event.as_vobject.serialize() ----- Even neater (for right now), would be to create new chandler.event.Events from a vobject. With this pattern, one could write a pretty small "loop over an ics using vobject and create a set of chandler2 Events that correspond". ----- coll = chandler.core.Collection(title='cal') for vevent in vobject(file='test.ics'): coll.add(Event(from_ics=vevent)) ----- But these are both ugly so I'm guessing neither is how things will eventually work. I'm thinking I can go ahead and write code that does the vobject loop-over-a-file and just manually translates as many fields into a new Event() to give me a collection to play with for now. (Stage 1 of persistence; load a file). But if there are any thoughts about how vobject may (or may not) fit into the chandler2 architecture eventually, that'd be interesting to hear. -- Jared _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "chandler-dev" mailing list http://lists.osafoundation.org/mailman/listinfo/chandler-dev
