Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
This script will cleanup your following list on Twitter. https://sferik.github.io/t/ needs to be installed.
#!/usr/bin/env bash
#
set -o nounset
set -o errexit
KEEPFILE=`mktemp /tmp/$(basename $0).XXXXXX`
KEEPLIST='Reading'
# create list with people who should not be removed in any case:
t list members $KEEPLIST | sed 's/ /\n/g' | sort -f > $KEEPFILE
# unfollow everyone who is not following back
# every user in $KEEPLIST is filtered from the list
t leaders | sed 's/ /\n/g' | grep -v -f $KEEPFILE | xargs -I {} t unfollow "@{}"
rm $KEEPFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment