Skip to content

kaplanoah/contacts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contacts processor

Takes names from Apple contacts and Facebook friends, and combines them and cleans them up.

Installing

  1. Clone or download the repository.

  2. Running the script requires Python. (Works with Python 2 and 3. Check for Python in terminal with: python -V)

Using

Add Apple contacts

  1. Open the Contacts app for mac.

  2. Select all the contacts you want to include (for all of them, ⌘A)

  3. Export the contacts as vCards (File > Export > Export vCard)

  4. Move the export to contacts_files/contacts.vcf:

$ mv <path_to_export> <path_to_repo>/contacts_files/contacts.vcf

The file should contain something like this:

N:Russ;Newton;;;
FN:Russ Newton
TEL;type=CELL;type=VOICE;type=pref:

Add Facebook friends

  1. Go to the Facebook page that has all your friends.

  2. Scroll to the bottom of the page so all your friends load and display.

  3. Copy the contents of the entire page (⌘A)

  4. Make a facebook_friends.txt file in the contacts_files directory.

  5. Paste the Facebook page contents into the facebook_friends.txt file.

The file should contain something like this:

Close Friend
Friends
Russell Newton
16 mutual friends

Run the script

$ python contacts.py

The output will be the names from all the contacts and friends.

Remove names

To remove a name from the output, add a remove.txt file to contacts_files and put one name on each line:

Lorene Stone
Jamie Hansen

Combine names

To combine several names into one name, add a combine_and_convert.csv file to contacts_files and put comma separated names that you want combined. The output will always use only the first name on each line:

Russ Newton,Russell Newton

Testing

From the contacts directory, run:

$ python -m unittest discover tests

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages