Saturday, July 21, 2007

Migrating Evolution Contacts to Gmail

Evolution exports its contacts in a VCard format. You can simply select all contacts that you want to export and save a VCard. All VCards a saved in the same file.

Getting the contacts out of VCard format and into something that is usable for GMail takes a little Perl code. The following code creates a comma separated value format file in GMails native format. It currently only supports two sections Personal and Work.

The inspiration for this was is was based on the Linux Journal article at http://blog.ibao.net/linux/2004/07/19/export-evolution-address-book-to-gmailbut it was completely rewritten (well some cut and paste and editing) to take advantage of the GMail csv format that allows you to import your information into named sections. In addition, it properly formats the address (Canadian Standards)

No doubt you may need to modify it for your own use. That is fine, but this code is licensed under the terms of the GNU General Public Licence

You can download the code from: http://timlegge.googlepages.com/evol_gmail.pl

You should note that an issue in GMail results in being unable to view some imported contacts. The work around is to clear your cache and restart the browser.

I have updated the script recently to use alternative email addresses if they are available...

3 comments:

cagatay said...

is there a reverse conversion ?
from gmail contacts to evolution

Timothy Legge said...

Good question, but since I have no plan to move back to Evolution, I don't have one.

Konrad Karamillo said...

The reverse conversion Gmail-->Evolution is easy and works via VCF export from Gmail. Evolution takes these VCF files without problems (at least for me - there seemed to be an issue with special entries, but this should be fixed now).

By the way: Thanks for this little perl script, it's exactly what I need right now!