[Vobject] Custom Labels

Dustin Davis dustin at sendoutcards.com
Fri Dec 11 17:11:25 CST 2009


Nice! Thanks Jeffrey

Jeffrey Harris wrote:
> Hi Dustin,
>
>   
>> Notice there are some records spanned across multiple lines. Can vobject 
>> replicate this? I would like to be able to implement custom labels like so:
>>
>> item(n).X-JABBER:jabber at jabber.com
>> item(n).X-ABLABEL:MyCompany's Jabber
>>
>> Is this currently possible?
>>     
>
> Yes, VCARD group labels are supported by vobject.  I've never understood
> why this syntax was introduced, since parameters would seem to do the
> trick, but you're right, this is what several contact clients expect
> (and yes, that syntax is valid VCARD 3.0).
>
>   
>>>> c = vobject.vCard()
>>>> foo = c.add('foo')
>>>> foo.value = "bar"
>>>> foo.group = "grouplabel"
>>>> print c.serialize(validate=False)
>>>>         
> BEGIN:VCARD
> VERSION:3.0
> grouplabel.FOO:bar
> END:VCARD
>
>
> Sincerely,
> Jeffrey
> _______________________________________________
> VObject mailing list
> VObject at lists.skyhouseconsulting.com
> http://lists.skyhouseconsulting.com/mailman/listinfo/vobject
>   


More information about the VObject mailing list