Does anyone know how I can merge/deduplicate contacts in a .vcf vcard file?

A nice easy graphical option would be ace but I have some terminal experience if necessary. I’ve tried vcardtools.py but I couldn’t work out how to use it.

Any help would be greatly appreciated,

Thanks!

  • gigachad@sh.itjust.works
    link
    fedilink
    arrow-up
    4
    ·
    1 month ago

    I’m also interested in this. After moving my contacts 3 times in a vcs in the ladt yeard it is an absolute mess…

    • ChurbleyimyamOP
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 month ago

      Yeah, after importing contacts back and forth between my android phone and Thunderbird I’m in the same boat. Trying to avoid manually selecting the 400 or so duplicates to delete them… The duplicates aren’t visibly listed in my phone’s app but when I export a .vcf file from it and open it in Thunderbird or Gnome Contacts they are. I’m surprised that my desktop apps don’t have something inbuilt to deal with this.

      • gigachad@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        ·
        1 month ago

        I tried to do this manually on my phone, but no chance. The contacts randomly split or merge, then another telegram account pops up, the next contact is protected and therefore cannot be removed but only be hidden. Some contacts are not on DEVICE, so messaging apps cannot access them etc.

        If you find a solution to sanitize vcfs let me know. I guess one day I write all the numbers onto a piece of paper and start from scratch.

        Btw. I’m not sure if this community is the best place for this.

        • ChurbleyimyamOP
          link
          fedilink
          arrow-up
          1
          ·
          1 month ago

          I think I’ve found a workaround. In the Fossify Contacts app on my phone, in the settings I checked the box marked ‘merge duplicate contacts’. I then used the AOSP Contacts app to export them as a .vcf which I imported into Thunderbird, which is now showing no duplicates. I don’t know why the AOSP app is able to export without duplicates, even though it’s the Fossify app which has the ‘merge duplicate contacts’ option but there you have it…

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 month ago

    I spend a considerable amount of time trying to find a solution for Nextcloud. I ended up spending an hour deleting and merging contacts.

  • CCRhode@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    Does anyone know how I can merge/deduplicate contacts in a .vcf vcard file?

    Tonto2 is a python 3/Qt graphical app that runs on desktops. It’s main purpose is not to manipulate *.vcf files, but the appendix to the instruction pages tells how, anyway. Tonto2 uses a spread-sheet-like presentation paradigm. With appropriate magical mystical spells, you can import *.vcf as *.csv and sort the *.csv by last-name, phone-number, eMail, zip-code, or whatever. It won’t de-dup, but you can spot the duplicates easier once they’re collated next to one another in one sequence or another. Show just the significant attributes. Probably you’ll want to sort, look, sort, and look again. Killing entries is nearly as simple as checking them off. FAIR WARNING: This process is time consuming, frustrating, and fraught with peril. Keep several versions of your address list until you’re sure the final is the one you want to keep forever. My experience is that I always find stuff I want to keep in each of all (sometimes more than two) duplicate entries, so deleting the dup’s is not what’s called for. Merging means manually copying from one entry and pasting into another. Due to the judgemental nature of how to handle conflicting and out-of-date info, I’ve hesitated to try to automate the process.