lucc / khard

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

contacts with same uid in different address books #289

Open sss123next opened 3 years ago

sss123next commented 3 years ago

good day. i have two address books with contacts copied via evolution, copied contacts have same uid and khard does not work with such contacts, what is best/simplest way to workaround it ?

Card X from address book phone will not be available because there is already another card with the same UID: XXXXX.....
Card Y from address book phone will not be available because there is already another card with the same UID: YYYYY....
scheibler commented 3 years ago

Khard itself does not handle such cases.

But you could change the UIDs of every vcard with a small shell script.

Something like:

new_uid=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 36 | head -n 1)
sed -i "s/^UID:.*/UID:$new_uid/" example.vcf
sss123next commented 3 years ago

thx, i will try.

sss123next commented 3 years ago

this works, thx, but it would be nice to have ability to fix this case in khard itself