veilleperso / nabaztwit

Scripts to monitor twitter searches and to get results and your twitter replies in TTS on your Nabaztag

This URL has Read+Write access

veilleperso (author)
Sat Apr 25 02:54:28 -0700 2009
commit  ddff56807fff9052d1d5062611e02ca48069b34e
tree    c5fd5b9eaf54892ed15b99154f8858c8ded473cb
parent  1ca6174de4c8f314faacb3987063a40651e33866
name age message
file .gitignore Loading commit data...
file README.textile
file example.ini
file nabaztag.php
file twitscan.php
README.textile

NabazTwit is a script which try to provide a better way to combine twitter and the Nabaztag.

Why?

The Violet twitter modules takes all your friends twits and send them in TTS (Text to speech) to your Nabaztag.
It can be really too much noise as you can have a lot of friends, and also, the nabaztag is not good at reading urls or smileys

What do this script do?

This script can read only the replies made to you (i.e. with a @your_nickname in the text) and private message received
Before sending thoses twits to your nabaztag, the script remove all smileys and urls.
And the script also check if your nabaztag is awake (otherwise it don’t send message to prevent mailbox overload)
At the end you receive less noise and more undestandable TTS messages

How to make it works?

  • You need PHP 5
  • copy or rename example.ini as config.ini and edit it to put your settings
  • Install this script as a cron task (every 3 minutes is a good choice)

  crontab -e
  */3 * * * * php ~/nabaztwit/nabaztag.php

To manually verify that the script run you can do
php nabaztag.php

This script works for me.
It’s tested under Mac OSX 10.5 and Ubuntu 8.10

If something goes wrong for you, please first try to guess what is wrong by yourself.
You can activate debug mode, by changing $debug to true near the top of the script

Feel free to enhance, adapt, evolve it for your own needs.

REMARK:

This script consume 2 API request per run (1 to retrieve your replies and 1 to retrieve your direct messages)

known issues

  • sometime part of the sentence is not read by the rabbit, i don’t know why