/ Published in: Bash
I did not write the script, a friend did.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# Author: Robert P. Levy # Description: Displays continuous pages of tweets from oldest to newest. # Instructions: Copy the function into your .bashrc file. # parameter 1 is number of pages to show # ( shows tweets made by all users you are following ) # parameter 2 (optional) is name of specific user on twitter # ( shows all tweets made by that user ) function tw { if [ $(echo "$2" | wc -c) -gt 1 ] ; then url="http://twitter.com/$2" else url="http://twitter.com/home" fi pages=$1 for i in $(seq 1 $pages) ; do curl --basic --silent --user "USERNAME:PASSWORD" --data-ascii "page=$i" $url; done | grep -B 6 -A 1 "entry-content" | sed 's/<[^>]*>//g' | sed 's/&[^;]*;//g' | sed 's/\s*/ /' | grep -v "^ $" | tac }
URL: http://robertplevy.net/tw.txt