khard icon indicating copy to clipboard operation
khard copied to clipboard

contacts with same uid in different address books

Open sss123next opened this issue 4 years ago • 3 comments

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....

sss123next avatar May 26 '21 12:05 sss123next

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

scheibler avatar May 26 '21 14:05 scheibler

thx, i will try.

sss123next avatar May 26 '21 14:05 sss123next

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

sss123next avatar May 26 '21 14:05 sss123next