Skip to content

Instantly share code, notes, and snippets.

@rileyjshaw
Created November 14, 2016 08:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rileyjshaw/fab2c01b9bb85e598fffba130ca28d0a to your computer and use it in GitHub Desktop.
Save rileyjshaw/fab2c01b9bb85e598fffba130ca28d0a to your computer and use it in GitHub Desktop.
Create a private Twitter list out of someone else's feed so you can read it.
#!/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/
#
# 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"
@rileyjshaw
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment