lucc / khard

Console vcard client
https://khard.readthedocs.io/en/latest/
GNU General Public License v3.0
595 stars 66 forks source link

Import VCF with single contact #330

Closed timmli closed 9 months ago

timmli commented 9 months ago

What is the recommended way to import a VCF with a single contact into Khard's database?

I have tried khard new --input-file contact.vcf (v0.17.0) but that was unsuccessful.

There is an issue that sounds similar: https://github.com/lucc/khard/issues/287 My problem, however, is not having single files with many contacts.

lucc commented 9 months ago

There is no import command for vcf files. You can simply copy/move the file into khard's address book folder because internally khard uses vcards to store contacts.

timmli commented 9 months ago

Moving the VCF to the address book (vdir) does not work in my case, because the VCF does not yet have a UID. Any suggestions how to handle VCF without UID?

lucc commented 9 months ago

The docs of khard have a note about tools that can help sanitizing vcards before coping them to the khard folder: https://khard.readthedocs.io/en/latest/scripting.html#integration