3

I have a .vcf file with a large number of contacts( 29000!). I want to merge duplicates(e.g. same name, two entries, one with email, the other with phone number), and remove exact duplicates for them. I checked out some android applications, but they are good only for a few number of contacts. E.g. I tried Go Contacts Ex, it scans for duplicate entries by name, email or number. But the no of duplicate entries in my case would be very huge.

I'm thinking if there's some way that I can convert the vcf file to csv, edit it, and convert it back to vcf and import it into my phone(S4) Thoughts and suggestions on how to do it?

user415
  • 53
  • 1
  • 6

2 Answers2

1

There is a simple python script in this project here https://code.google.com/p/nodupe/. If you have subversion installed you can check it out using svn checkout http://nodupe.googlecode.com/svn/trunk/ nodupe or you can copy and paste the script from https://code.google.com/p/nodupe/source/browse/trunk/src/nodupe.py?r=2 . The idea to convert to csv is probably not leading anywhere (at least it would not lead to a clean solution), among others because vcard entries can contain the separation characters used by csv.

Since you mention that you want to use the contacts with an android phone, this app may be relevant for you: https://play.google.com/store/apps/details?id=com.compelson.optimizer&hl=en It can perform various operations to clean and merge contacts. For this you would need to make your vcf file available as an android contacts resource, so you might want to import the contacts to your phone first and then perform the optimizations.

highsciguy
  • 2,569
  • 3
  • 34
  • 59
  • The linked version is only the free variant (otherwise payware) with a limited feature set. – Cadoiz Mar 13 '21 at 13:51
0

You don't need to convert vcf to csv because you can open vcf as text file.

So you can write some simple python script to exclude duplicates and combine any data by different rules.