Created
January 7, 2015 20:15
-
-
Save code2k/9699169d8df29fc35773 to your computer and use it in GitHub Desktop.
This script will cleanup your following list on Twitter. https://sferik.github.io/t/ needs to be installed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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