Part 1: Intro

This is a rather geeky, nerdy way to keep track of who unfriended you on Facebook..

It requires a bit of computer literacy. At the same time, the results are quite simple and appealing. It’s going to be done with a command-line script. I will walk you through it, but let’s review the details first.

Imagine if you had a file on your computer with these contents:

2024-11-15.txt:

Roger Daltrey
John Entwistle
Keith Moon
Pete Townshend

Then a month later you have another file:

2024-12-15.txt:

Roger Daltrey
John Entwistle
Keith Moon

So, it looks like Pete unfriended you. And, how can you get the computer to show you this information very simply? With the “diff” command.

diff 2024-11-15.txt 2024-12-15.txt

and it outputs:
< Pete Townshend

Great.

Now the tricky part. How do you create the files 2024-11-15.txt and 2024-12-15.txt ?

go to your friends page, which might be at a URL such as this:
https://www.facebook.com/_your_name_/friends

Copy and Paste the contents of the Friend’s list into a file on your computer. That is, click and drag and select on that page in the browser. Right-click->Copy. And then Paste it into a text file. The results will be turn out to be something a bit messy like this:

FriendFriends
Roger Daltrey
225 friends

FriendFriends
John Entwistle
229 friends

FriendFriends
Keith Moon
304 friends

Extra information will appear such as “FriendFriends” or “Mutual Friends” or “University of Colorado” or “Director of Widgets”, tacked onto the regular list.

How do you clean up the file so that it’s simply:

John Entwistle
Keith Moon
Roger Daltrey

And for this, my friends, I have written a little program. 🙂

What I kindly request is that if you download this little program, and read it, and use it to keep track of your friends, that you send me $4 on PayPal. But only if the program works for you. Do you agree? If so, on to Page 2