Created
June 3, 2014 12:29
-
-
Save bkeepers/6c86742b86351ca34bea to your computer and use it in GitHub Desktop.
Signal & Noise lists on Twitter
This file contains hidden or 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
#!/bin/bash | |
# | |
# This script encapsulates my process for keeping up with Twitter: | |
# | |
# 1. Create a private list called Signal, add everyone you currently follow to | |
# it, and begin curating it. | |
# 2. Follow everyone you meet or find interesting. | |
# 3. Create a private list called Noise, containing everyone you follow that are | |
# not in Signal. | |
# 4. Use Signal as your timeline in tweetbot. Switch to Noise when you are bored | |
# or are looking for inspiration. | |
set -e | |
echo "Getting lists…" | |
LISTS=$(t lists) | |
echo "Getting all followings…" | |
FOLLOWINGS=$(t followings | sort -u) | |
if ! echo $LISTS | grep -qi Noise; then | |
echo "Creating Noise list…" | |
t list create -p Noise | |
fi | |
if ! echo $LISTS | grep -qi Signal; then | |
echo "Creating Signal list…" | |
t list create -p Signal | |
echo "Adding all followings to Signal…" | |
echo $FOLLOWINGS | xargs t list add Signal | |
echo "Done. Now use Signal as your timeline and continue to curate the list." | |
echo "Use Noise when you're bored or looking for inspiration." | |
# Everyone is signal to start, so no need to do the rest | |
exit 0 | |
fi | |
echo "Getting Signal members…" | |
SIGNAL=$(t list members Signal | sort -u) | |
echo "Getting Noise members…" | |
NOISE=$(t list members Noise | sort -u) | |
echo "Following everyone from Signal…" | |
comm -13 <(echo $FOLLOWINGS) <(echo $SIGNAL) | xargs t follow | |
echo "Removing Signal members from Noise…" | |
comm -12 <(echo $SIGNAL) <(echo $NOISE) | xargs t list remove Noise | |
echo "Removing unfollowed people from Noise" | |
comm -13 <(echo $FOLLOWINGS) <(echo $NOISE) | xargs t list remove Noise | |
echo "Adding everyone else to Noise…" | |
comm -23 <(echo $FOLLOWINGS) <(echo $SIGNAL) | xargs t list add Noise |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment