Import and export of Contacts

Contacts can be imported from vCard files:
$ syncevolution --import test.vcf backend=evolution-contacts
#0: pas-id-552B785D00000008
If you have many vcf files, put them in a directory and pass the directory name as the --import argument.
For export use:
$ syncevolution --export /home/phablet/Documents/utcontacts.vcf backend=evolution-contacts
$ syncevolution --print-databases | more
Evolution Address Book = Evolution Contacts = evolution-contacts:
Personal (system-address-book)
$ syncevolution --print-items backend=evolution-contacts | more
pas-id-55290E7600000002: Sparda Bank
pas-id-5529531900000006: Hofpfisterei Deisenhofen
pas-id-552B785D00000008: Gemeinde Taufkirchen
The first word before the colon is an item ID. It is guaranteed to not contain a colon or characters that are special in a shell. The other item operation commands take such item IDs as optional parameters.
Print to stdout (mind the hyphen after --export!), using the native data format of the storage (no conversion):
$ syncevolution --export - backend=evolution-contacts --luids pas-id-55290E7600000002
N:;Sparda Bank;;;
FN:Sparda Bank
When several IDs are given, the vCards are seperated by empty lines, which are guaranteed to not occur in the items themselves. When no ID is given, all items are exported.
How to update a single contact:
$ syncevolution --export /tmp/sparda.vcf backend=evolution-contacts --luids pas-id-55290E7600000002
modify the file /tmp/sparda.vcf and reload it:
$ syncevolution --update /tmp/sparda.vcf backend=evolution-contacts --luids pas-id-55290E7600000002
#0: pas-id-55290E7600000002
or you may delete it with:
$ syncevolution --delete-items backend=evolution-contacts --luids pas-id-55290E7600000002
[INFO] deleting "Sparda Bank"
and restore it again from the file with:
$ syncevolution --import /tmp/sparda.vcf backend=evolution-contacts
#0: pas-id-5579DC5D00000000
It is also possible to wipe out all items at once:
$ syncevolution --delete-items backend=evolution-contacts --luids '*'
Last updated: Sat Oct 17 13:09:43 CEST 2015