Created
February 21, 2014 13:04
-
-
Save spudtrooper/9133891 to your computer and use it in GitHub Desktop.
Prints a user's twitter stream using cowsay.
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
#!/bin/sh | |
# | |
# Prints a user's twitter stream using cowsay. | |
# | |
# Usage: | |
# | |
# % twittercowsay <user> | |
# | |
# http://jeffpalm.com/twitterer | |
# | |
user=$1; shift | |
if [[ x = x$user ]]; then | |
echo "Usage $0 user" | |
exit 1 | |
fi | |
lines=$(curl -s http://jeffpalm.com/twitterer/twitterlines.php?u=$user) | |
IFS=$'\n' | |
for line in $lines; do | |
clear | |
cowsay $line | |
sleep $(( ${#line} / 10 )) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment