Put your latest tweet as Pidgin’s status on Ubuntu (Linux)
Twitter became a trend nowadays when almost everything important is being found out via this social-networking micro-blogging service. And now with Google’s real time search-results that includes tweets too, Twitter is recognised as a powerful platform by even the Internet’s giant. Since your (and mine too) online presence might include a few tweets a day, in a moment of total boredom, I decided to write a simple Python script that would update your Pidgin’s status with the latest tweet from your account.
Using the same principle as the script I wrote for updating Pidgin’s status with a random post from your blog’s feed, this new script uses as well a feed (the one provided by Twitter to every user), only that this time only the latest tweet will be set as status. Replies are ignored and therefore if your latest Twitter interaction is a reply, the script will search for the latest tweet which is doh not a reply. Because hash-tags represented a problem when trying to set Pidgin’s status the hash signs (#) are eliminated.
To properly use the script, the following steps should be followed:
- download the script from here and save it to your
~/bindirectory (if the directory doesn’t exist, create it) - make it executable
chmod +x twitterize_pidgin_status.py
- setting your DBUS session parameters requires exporting some variables to your environment. Download this script to the same
~/bindirectory, make it executable and add it via System – Preferences – Startup Applications to the list of programs that start at log in. This way you’ll always be sure the needed variables are available; - edit your crontab to make the script check for updates as often as you wish (every 5 minutes in this example)
SHELL=/bin/bash DISPLAY=:0.0 */5 * * * * source ~/.Xdbus; ~/bin/twitterize_pidgin_status.py your_twitter_feed
Now the only thing that remains to do is to tweet. Have fun!
You might also like:
Leave a comment
Recent Posts
Projects that I support
Recent Comments
nope said:
yeah that was my first thought too, but: mount: warning: seems to be mounted read-write. too bad, would have been just perfect. more»Klaus Deiss said:
Dear Radu, I tried it on Ubuntu 10.0.4.2 and 10.0.4.3 with different kernel versions (amd64 server 2.6.32 kernel). No... more»scompo said:
Nope.. Now it’s not working again.. This printer it’s a real pain in the butt.. The other hp printer I had... more»Dmitrij said:
Thank you Peter and Patrice. Could you please post the updated script? more»hd_flash_pains said:
didn’t work for me more»







