[Vobject] Mac OS X AddressBook and vobject

Jeffrey Harris jeffrey at skyhouseconsulting.com
Mon Jan 16 22:36:14 CST 2006


Hi Lars,

> I'm totally new to vobject; I downloaded it today.
> 
> I'm glad it exists, I've been avoiding to write one for myself for years.
> 
> And it does work!

Great!  Thanks for giving it a try!

> I just hit a minor snag with data that was exported from the Mac OS X
> Address Book.
> 
> vCards from AB looks like:
> 
> BEGIN:VCARD
> VERSION:3.0
> N:Immisch;Lars;;;
> FN:Lars Immisch
> TEL;type=HOME;type=pref:040-3172542
> item1.ADR;type=HOME;type=pref:;;Reeperbahn 116;Hamburg;;22767;
> item1.X-ABADR:de
> item2.X-ABRELATEDNAMES;type=pref:Claudia Daboul
> item2.X-ABLabel:_$!<Partner>!$_
> END:VCARD
> 
> I believe this is valid according to RFC 2426.
> 
> Attached is an ad-hoc patch that allows me to read my AB-generated
> vCards. The difference is the optional group before the name.

Thanks for the patch, it looks good.  I haven't done much with vCards
yet, I'm looking forward to lots of bugs filed relating to vCards, bugs
with patches attached are even better!

Do people think it's worth storing and serializing group information
when parsing vCards?  RFC 2425 says grouping has presentation
implications, but no semantic meaning.

I think the presence of a group prefix should probably be stored and
validation should fail for iCalendar streams which are successfully
parsed but contain groups.

Thoughts?

Also, I've been planning a pretty significant change to vobject
semantics in the next week or so.  Most properties only occur once, so
it's really annoying to always have to add a [0] to access one property.
 I'm considering changing the ContentLine __getattr__ and __setattr__ to
treat component.foo as a reference to the first foo property in
component, and component.foo_list as the full list of foo properties.

Thoughts, part two?

Sincerely,
Jeffrey


More information about the VObject mailing list