Skip to content

Instantly share code, notes, and snippets.

@rileyjshaw rileyjshaw/ditter.sh
Created Nov 14, 2016

Embed
What would you like to do?
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

This comment has been minimized.

Copy link
Owner Author

rileyjshaw commented May 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.