- coils-get-vcard
- coils-parse-vcard
The coils-parse-vcard performs the opposite action - it accepts a vCard file and produces the Omphalos representation of the attributes derived from the vCard. This reveals how OpenGroupware Coils will respond to a vCard that is PUT from a client.$ coils-get-vcard --objectid=10100 BEGIN:VCARD VERSION:3.0 UID:coils://Contact/10100 ADR;X-COILS-ADDRESS-TYPE=location;TYPE=other:;Bang the dums Incorporated;9999 Mo nroe Ave NW;Grand Rapids;MI;49505;USA ADR;X-COILS-ADDRESS-TYPE=mailing;TYPE=work,pref:;Bang the dums Incorporated;9999 Monroe Ave NW;Grand Rapids;MI;49505;USA ....
$ coils-parse-vcard --file=10100-2.vcf
{'_ADDRESSES': [{'city': u'Grand Rapids',
'country': u'USA',
'name1': u'Bang The Drums Incorporated',
'postalCode': u'49599',
'state': u'MI',
'street': u'9999 Monroe Ave NW',
'type': u'location'},
{'city': u'Grand Rapids',
...Optionally the --update option to coils-parse-vcard will cause the utility [using an administrative context] to create or update the related Contact in the OpenGroupware Coils instance. So coils-parse-vcard can double both as a debugging tool and a data import tool.
No comments:
Post a Comment