Bash script to read Twitter statuses out loud

This is a small Bash script that downloads your friends statuses and reads them aloud using the Festival speech synth. You need to download some packages first. On Ubuntu do:

sudo apt-get install curl xmlstarlet festival

After installing the command is:

curl -s -u twitterusername:twitterpassword 'http://twitter.com/statuses/friends_timeline.xml?count=5' | xmlstarlet sel -t -m '//status' -v 'user/screen_name' -o ': ' -v 'text' -n | festival --tts

You should hear a computerized voice reading your friends latest updates.

If you find this useful, it can be interesting to save the script and put it in the Linux crontab file to automatically do it every so often. Just run crontab -e and include the following:

* * * * * /home/robojamie/twittertalk.sh

That updates every minute, so you may want to adjust it. Just take look at the cron tab syntax.

This entry was posted in Linux, twitter and tagged , , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>