Skip to main content

This small program will export your contact from an itunes backup.

Project description

A sad IPHone story ...

I wrote this python script after my iPhone had a unrepairable hardware failure and a corrupt iTunes backup that could not be restored on my new iPhone! I was losing pictures but not that much as I regularly extracts them, but it was a totally different story for the contacts, as iTunes offers no way to extract them and I refuse to send my data to iCloud. I search for a way to recover my contacts and I found not only many applications that all promise that they will repair and/ore recover you data, but also simple script that extract them from the database of the address book. You just need a backup from iTunes. So I decided to write my own version that extracts all the fields I need in a vCard 3.0 format. I do not intend to cover all the cases but i think it is already quite complete, and I hope it will help others. I took this opportunity to write it in python, language that I barely know, so i ask for mercy to the experts in Python because I probably do not follow theirs best practice :)

Install

prerequisits

Intall

    pip install itunescontactsexport

or

    pip install pipx
    pipx install itunescontactsexport

Usage

There 2 modes to use this script:

  • iTunes mode: You need to have access to the directory of a iTunes backup of your phone. The script will figure out where are the databases of the address book and export the contacts
  • db: You need to provide the path to the address book you want to export and optionally the path to the iamges database of the address book

The image quality refer to the available thumbnail in our thumbnail database:

  • originale: it use the originale image with no transformation
  • best: use the thumbnail with the highest resolution
  • lowest: use the thumbnail with the lowest resolution.

Backup from iTunes

positional arguments:
 backupDir             Path to the directory of the Itunebackup

optional arguments:
 -h, --help            show this help message and exit
 -bday                 Use BDAY instead of ANNIVERSARY (not iphone friendly
 -q {best,lowest,orig}
                       Image quality: best, lowest, originale
 -o outputFile         Path to export file

Backup from db

positional arguments:
 addressBookDBPath     Path to the addressbook database

optional arguments:
 -h, --help            show this help message and exit
 -bday                 Use BDAY instead of ANNIVERSARY (not iphone friendly
 -q {best,lowest,orig}
                       Image quality: best, lowest, originale
 -i imagesDBPath       Path to the images database
 -o outputFile         Path to export file

Limitations

The attributs exported to the vcard are:

  • uid of the contact
  • last modification of the vcard
  • Name (Given, middle, Familly)
  • Nickname
  • job title
  • Phones numbers
  • Addresses
  • emails
  • Birthday
  • relatives
  • images
  • Notes
  • urls

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iTunesContactsExport-0.1.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iTunesContactsExport-0.1.1-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file iTunesContactsExport-0.1.1.tar.gz.

File metadata

  • Download URL: iTunesContactsExport-0.1.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.6 Linux/5.19.7-200.fc36.x86_64

File hashes

Hashes for iTunesContactsExport-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ca79d91f11e5b7f19836473ea3834a9a26600ee1ec5a823fc4ba12e08b6ef1e1
MD5 ec85de09c2adfbae580d4aba8b4d809c
BLAKE2b-256 9ae22e3288f4e3d14ecf30624593e962430b90558f1644bac55604862ac3ae48

See more details on using hashes here.

File details

Details for the file iTunesContactsExport-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: iTunesContactsExport-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.6 Linux/5.19.7-200.fc36.x86_64

File hashes

Hashes for iTunesContactsExport-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d852cb5a0cf6945bdc209b6aa9f0b1eae5ec33be2c61eb09b9f3adc7c06c969
MD5 ee51dceaad67ef9f826ebf97d7b0eb02
BLAKE2b-256 7517e74b446baa089273e1c13716969da77147d686032ee3542f4a3156048d13

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page