I ended up writing a bash script to compare Facebook and my address book.
Before running this script, I go to my Facebook friends list "jazz", and copy the generated HTML source into jazz.html
.
When I run the script, it shows which jazz-tagged contacts are missing from Facebook, and I proceed to add them manually.
The jazz-addressbook
line depends on your particular address book format, so please adapt it.
#!/bin/bash
# Create a text file containing the Facebook ids of all the people in my Facebook friends list "jazz"
cat jazz.html | sed -e "s/li class/\n/g" | grep "checkableListItem selectedCheckable" | sed -e "s/.*value=\"//g" | sed -e "s/\".*//g" | grep -v "Done" | sort > jazz-facebook
# Create a text file containing the Facebook ids of all the people marked "jazz" in my address book
cat address-book.xml | depends on your address book format | sort > jazz-addressbook
echo "Missing from Facebook:"
diff jazz-facebook jazz-addressbook | grep ">" | sed -e "s/> //g"
echo "Missing from address book:"
diff jazz-facebook jazz-addressbook | grep "<" | sed -e "s/< //g"