Speak the top 6 lines of your twitter timeline every 5 minutes.....

while [ 1 ]; do curl -s -u username:password http://twitter.com/statuses/friends_timeline.rss|grep title|sed -ne 's/<\/*title>//gp' | head -n 6 |festival --tts; sleep 300;done
Pump up the chatter, run this script on a regular basis to listen to your twitter timeline. This is a rough first cut using several cli clips I have spotted around. There is no facility to not read those things already read to you. This could also easily be put in a loop for timed onslaught from the chatterverse, though I think it might violate several pointsof the Geneva Convention UPDATE - added a loop, only reads the first 6 twits, and does this every 5 mins.
Sample Output
blah blah blah blah

10
By: tomwsmf
2009-02-20 20:20:21

These Might Interest You

  • Gets the latest Tweets in your friends timeline from Twitter. Uses curl and xmlstarlet.


    4
    curl -s -u user:password 'http://twitter.com/statuses/friends_timeline.xml?count=5' | xmlstarlet sel -t -m '//status' -v 'user/screen_name' -o ': ' -v 'text' -n
    mheadd · 2009-02-23 17:30:24 1
  • *** CAREFULLY READ THE NOTES **** *** THIS DOES NOT WORK "OUT OF THE BOX" *** You'll need a few minutes of CAREFUL reading before making your own Twitter feed: In 2010 simple command line Twitter feed requests all stopped working because Twitter upgraded to SSL security. Https requests for a filtered Twitter stream feed now require a special header called "oauth_header". The benefit is that your stream feed and login info is securely encrypted. The bad news is that an "oauth_header" takes some work to build. Fortunately, four functions, imaginatively named step1, step2, step3 and step4 can be used to build a customized oauth_header for you in a few minutes. Now, go look at "step1" to start creating your own oauth_header! Show Sample Output


    10
    step1 ; step2 ; step3 ; step4 ; curl -o- --get 'https://stream.twitter.com/1/statuses/filter.json' --header "$oauth_header" --data "follow=$id"
    nixnax · 2012-03-18 21:15:04 0
  • This combines @zurvollenstunde's hourly tweets and the "n minutes ago" from Twitter search. Show Sample Output


    0
    curl -s "http://search.twitter.com/search?from=zurvollenstunde&rpp=1" | grep -E '(Es ist jetzt|ago)' | sed 's/<[^>]*>//g;s/[^[:digit:]]//g' | xargs | sed -e 's#\ #:#'
    torrid · 2011-06-18 04:27:06 1
  • Easy way to find your computers IP in one place, ie, twitter It suppress the need of dyndns clients and remembering the complex names they give you. I put it inside KAlarm ( the cron GUI for KDE, ubuntu), to update my ip every 3 minutes. I did not add the cron statements to keep the code clean. Show Sample Output


    -1
    STAT=`curl http://www.whatismyip.org/`; curl -u YourUserName:YourPassword -d status=$STAT http://twitter.com/statuses/update.xml
    m33600 · 2009-10-26 23:02:30 0

What Others Think

Update...put it in a loop, will read top 6 twits every 5 mins. while [ 1 ]; do curl -s -u username:password http://twitter.com/statuses/friends_timeline.rss|grep title|sed -ne 's///gp' | head -n 6 |festival --tts; sleep 300;done
tomwsmf · 486 weeks and 6 days ago
Err, to get to work on Mac replace 'festival -tts' with 'say' viz: while [ 1 ]; do curl -s -u username:password http://twitter.com/statuses/friends_timeline.rss|grep title|sed -ne 's/<\/*title>//gp' | head -n 6 | say; sleep 300; done
binary1 · 486 weeks and 5 days ago
Doesn't work anymore due to twitter implementing oauth. Is there any workaround/fix for this?
d3Xt3r · 348 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: