py-vobject / vobject

A full-featured Python package for parsing and creating iCalendar and vCard files
http://py-vobject.github.io/
26 stars 7 forks source link

Add support for vCard 4.0 #29

Open da4089 opened 7 months ago

da4089 commented 7 months ago

IETF RFC-6350 documents the vCard 4.0 format.

vObject should be extended to support both creation and parsing of VCARDs in 4.0 format, while maintaining compatibility with vCard v3.0 and v2.1.

See also

Lxtharia commented 7 months ago

Most exited about this one, because that's the only thing that is missing for me in Radicale. Tried a lot of different CardDAV Servers, just for their v4.0 support, but they never really suited my needs.

Thanks for your work on this project!

mattdale77 commented 6 months ago

I would also like to see this. V4 specification is over 10 years old. Android creates V4 vCards so trying to interact with them or the same addressbooks is not optimal and at best can create a mixed version address book

da4089 commented 6 months ago

@mattdale77 do you have some example cards from an Android phone we can use for testing? Ideally, a person card and a company card, both with a bunch of the properties filled out?

mattdale77 commented 6 months ago

@mattdale77 do you have some example cards from an Android phone we can use for testing? Ideally, a person card and a company card, both with a bunch of the properties filled out?

The following created on Android 14 in an Etesync addressbook and extracted using the etebase library for Python. They have differing number of attributes filled in. One is a label I created or it may be referred to as a group in some places. It is represented by another vCard. Please let me know if I can do anything further.

BEGIN:VCARD VERSION:4.0 PRODID:-//EteSync//com.etesync.syncadapter/2.4.0 ez-vcard/0.11.2 UID:15176461-89f8-4158-ac27-73865b3ba979 FN:Test Testy N:Testy;Test;;; TEL;TYPE=cell:07123 123123 TEL;TYPE=home:07333 333336 NOTE:This is the notes field REV:20240429T002524Z END:VCARD


BEGIN:VCARD VERSION:4.0 PRODID:-//EteSync//com.etesync.syncadapter/2.4.0 ez-vcard/0.11.2 UID:e47b1867-a0c6-4c09-b524-9a62b2bab208 FN:Mr John Middle Smith\, PhD N:Smith;John;Middle;Mr;PhD ORG:Some Company TEL;TYPE=cell:+11115551236 TEL;TYPE=home:+1 222-555-4654 EMAIL;TYPE=home:home@myemail.com EMAIL;TYPE=work:work@myemail.com ADR;TYPE=home;LABEL="55 My Street\nSpringfield , Some County 55555\nUS":;;5 5 My Street;Springfield ;Some County;55555;US ADR;TYPE=work;LABEL="66 Another Street\nAnother City, A County 66666\nUS":; ;66 Another Street;Another City;A County;66666;US NOTE:Notes about the contact URL:http://www.mywebsite.com BDAY:20000430 RELATED;TYPE=co-worker;VALUE=text:Related Person RELATED;TYPE=friend;VALUE=text:Another Related Person REV:20240430T205447Z END:VCARD


BEGIN:VCARD VERSION:4.0 PRODID:-//EteSync//com.etesync.syncadapter/2.4.0 ez-vcard/0.11.2 UID:61ec9008-300d-4398-b2eb-0cb00d88d79c KIND:group MEMBER:urn:uuid:15176461-89f8-4158-ac27-73865b3ba979 MEMBER:urn:uuid:e47b1867-a0c6-4c09-b524-9a62b2bab208 FN:custom REV:20240430T205615Z END:VCARD


BEGIN:VCARD VERSION:4.0 PRODID:-//EteSync//com.etesync.syncadapter/2.4.0 ez-vcard/0.11.2 UID:a99cc7ab-27d4-4636-ac3a-b50cb771dcdd FN:Some Company ORG:Some Company TEL:+44 1234 123123 EMAIL;TYPE=home:sales@acompany.com NOTE:Notes about company URL:http://www.acompany.com REV:20240430T205947Z END:VCARD