All of which are American dreams

Title lifted from “Know Your Enemy”.

The results of the US presidential election last Tuesday shocked me. I checked Twitter to find that my entire feed felt the same. Again. Oops, I created a comfortable echo-chamber for myself.

Social news algorithms have been under intense scrutiny over the past week. I wanted to see what other people’s social media bubbles looked like, so I wrote a little shell script1.

I’m not interested in building empathy for racists. I am interested in improving my own awareness. This tool displaces me from the narrative I chose and delivers me from opinions I agree with. It’s helped me realize just how powerful a curated social feed can be as a tool of persuasion. Also, wow. People who follow Glenn Beck seem to follow a lot of porn. Who knew?

If you want to peer into someone else’s Twitter feed, the following might help2:

#!/bin/bash
# Create a private Twitter list out of someone else’s feed so you can read it.
# The name “ditter” is like “ditto” plus “Twitter” ha ha get it?
#
# Requires Python, GNU coreutils, and https://github.com/sferik/t
#
# Installation:
#
# $ chmod 777 ditter.sh && mv ditter.sh /usr/local/bin/ditter
#
# Usage:
#
# $ ditter <username> [<list_name>]
THEIR_USERNAME=${1}
MY_USERNAME="$(t whoami | grep '^Screen name' | grep -o '[^@]*$')"
LIST_NAME=${2:-"$THEIR_USERNAME-feed"}
t list create --private "$LIST_NAME"
# I aliased GNU split to “gsplit” on my Mac. You may need to change this.
t followings "$THEIR_USERNAME" \
| gsplit -l 100 --filter="xargs t list add \"$LIST_NAME\""
python -mwebbrowser "https://twitter.com/$MY_USERNAME/lists/$LIST_NAME"

It’s not pretty, but it works for me3. Here are some usage examples:

# View the feed of a random person who follows the “FOX Files”.
# Warning: You’re about to view a complete stranger’s feed. NSFW.
t followers foxfilesfnc | gshuf | head -1 | xargs ditter
# View the feed of the last person to use the Make America Great Again hashtag.
t search all "#maga" -cn 1 | tail -1 | cut -d, -f3 | xargs ditter

I’m in the habit of quietly throwing projects like this onto my lab page, but enough people have expressed frustration in the past week to make this share-worthy. Hope it helps!

Footnotes

  1. Twitter used to actually offer this as part of their official client. They removed the functionality in 2013.

  2. MacOS comes loaded with BSD utils, so I grabbed the GNU equivalents with brew install coreutils. That’s what gsplit and gshuf are.

  3. Restrictions apply:

    • Twitter has a longstanding issue where bulk lists created through the API might be missing members. It’s nothing a little while loop can’t fix, and even an incomplete list can be enough.
    • t has its own longstanding issue: it runs up against rate limits if you use it to fetch a large list of followers. This one probably requires a patch or PR.