You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New Files:
- vobject/vcard40.py - Complete vCard 4.0 (RFC 6350) implementation
- test_files/vcard40_simple.vcf - Basic vCard 4.0 test file
- test_files/vcard40_full.vcf - Full vCard 4.0 with all properties
- test_files/vcard40_group.vcf - vCard 4.0 with KIND=group and MEMBER
- test_files/vcard40_org.vcf - vCard 4.0 for organization
- test_files/vcard40_location.vcf - vCard 4.0 for location
- test_files/vcard40_multilang.vcf - Multilingual vCard 4.0 with ALTID
Modified Files:
- vobject/__init__.py - Added version parameter to vCard(version='3.0')
- tests.py - Updated behavior registry test for new behaviors
- test_files/more_tests.txt - Added dual-version doctest tests
New vCard 4.0 Properties Implemented
- KIND - individual/group/org/location
- GENDER - sex and gender identity
- ANNIVERSARY - marriage date
- LANG - language preferences with PREF
- IMPP - instant messaging URIs
- RELATED - relationships with TYPE
- MEMBER - group members (only for KIND=group)
- CLIENTPIDMAP - sync mapping
- XML - extended XML data
- SOURCE - vCard source URI
Usage:
```python
import vobject
v3 = vobject.vCard()
v4 = vobject.vCard('4.0')
v4.add('fn').value = 'John Doe'
v4.add('kind').value = 'individual'
v4.add('gender').value = 'M'
parsed = vobject.readOne(vcard_string) # Works for both 3.0 and 4.0
```
0 commit comments