Finding duplicate contacts in your address book


One of the common complaints about the Maemo address book is that it’s easy to get a lot of duplicate contacts as the address book is able to pull your contacts from various IM services. From the beginning there has been a way to merge duplicates, but it meant manually going through all of your contacts hunting down the duplicates.
Today I finished writing the first version of a program that tries to automatically detect duplicates based on the IM names, emails, phone numbers and names. Of course this is just based on heuristics; you still have to go through the list and select the contacts that you want to merge. You can find this utility under the name “Merge your duplicate contacts” in the application manager and it’s available in Maemo extras-devel. Remember that extras-devel contains unstable software: enable it only if you really know what you are doing!
After installing Contacts Merger you have to reboot your phone[1] and then you will get a “Find duplicate contacts” button in the menu of the main address book window.

The window suggesting the possible merges
The window suggesting the possible merges

Update: I released 0.1.1 that fixes a crasher in case of malformed contacts.

Update 2: Forgot to say where to get the code.

[1] Sadly the address book doesn’t automatically load newly installed plugins without a restart; see bug #10542.

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts

Reader Comments

Seriously, *THANK YOU* :-)

Grazie mille, davvero utile! :)
Thanks a lot, really useful! :)

Thank you!
It`s a great new for me, that finaly appeared this soft.
What can you say about this bug?
https://bugs.maemo.org/show_bug.cgi?id=10436

Marco: your software simply search for duplicates and you actually use Maemo API to merge found contacts?

Finally :-)

I *so* screwed this up, the world could have had this much earlier. Nice interface lift :-)

Andrea:
Yes, but I cheated here by adding the needed stuff in the latest release of libosso-abook so my program could work ;)

[...] Marco Barisione ha desarrollado un programa denominado Contacts Merger que trata de encontrar de forma automática los contactos duplicados utilizando el nombre, teléfono o el alias del IM. Una vez instalada la aplicación debes de reiniciar el terminal y después podrás ver un nuevo botón que dice Find duplicate contacts en el menú principal de la agenda de contactos. [...]

How about turning that into a library and adding support for it to KMail, Thunderbird, Evolution, SHR Contacts and so on?

dude you’re the BEST !

@foo:
No, not enough code and it’s too specific for Fremantle.

[...] my previous post about the contacts merger, I fixed a crash, made it handle better broken vcards, improved the partial matching and made the [...]

[...] my previous post about the contacts merger, I fixed a crash, made it handle better broken vcards, improved the partial matching and made the [...]

DUUUDE, SRSLY!!!!!!

you saved my life :D

maybe a little option to choose wich avatar you want the merged contact to have would make this app perfect!

It would be nice to point out that the displayed name is actually “Merge your duplicate contacts”. I had trouble finding it in the application manager because I was looking under “Contact Merger”.

An idea for further dev would be to be able to permanently ignore matches so they don’t appear in the list anymore.

@cliff:
Thanks :)
The dialog to resolve conflicts comes from the address book library and that doesn’t handle avatar conflicts.
Dunno why, I guess to avoid too many conflicts.

@Nicolas:
Yeah, I forgot about that, but it’s fixed in the new post and now also in this one.

[...] you have any application that adds buttons to the address book (like the contacts merger), you could have noticed that the buttons recently disappeared. This happened because of a bug in [...]

[...] you have any application that adds buttons to the address book (like the contacts merger), you could have noticed that the buttons recently disappeared. This happened because of a bug in [...]