Skip to content

Conversion script for importing Google Contacts' VCard into /e/ cloud with photos

License

Notifications You must be signed in to change notification settings

lorcap/e-vcard-google

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

e-vcard-gmail

This simple Python script allows you to import Google Contacts into your /e/ cloud account while preserving contact photos.

How to migrate your Google Contacts

  1. Go to your Google Contacts.
  2. Export your contacts as vCard (for iOS Contacts) into contacts.vcf.
  3. Run this script as e-vcard-gmail.py contacts.vcf contacts-e.vcf.
  4. Go to your /e/ cloud and import contacts-e.vcf.

How to update your /e/ contacts

If you already migrated your contacts, you can convert only those contacts that have a photo on Google Contacts. Use option --with-photo. After importing, contacts have to be merged manually.

Usage

usage: e-vcard-gmail.py [-h] [-n] [-p] filein fileout

positional arguments:
  filein            input vCard file
  fileout           output vCard file

optional arguments:
  -h, --help        show this help message and exit
  -n, --dry-run     do not download anything
  -p, --with-photo  filter out contacts without photo

vCard version 2.1

vCard v2.1 (exported from old Android phones) is not supported. Please, consider convertining it with Jochen Welle's vcard2to3.

Technical details

Google vCards provides contact photos as URLs which can be downloaded without any account login. On the other hand, /e/ accepts photos encoded with Base64.

For each vCard, this script downloads the photo, encodes it, and writes it to the output file, properly handling long lines (which start with a blank).

About

Conversion script for importing Google Contacts' VCard into /e/ cloud with photos

Topics

Resources

License

Stars

Watchers

Forks

Languages