Fortune and Pidgin’s status on Ubuntu (Linux)
Following the post about my laziness and Tudor’s comment from here, I went on to study how fortune works and I have found a way to use it to change your status in Pidgin using posts from your WordPress blog. It’s quite neat if you think and also this trick could bring you more traffic to your blog.
This is the how to:
- create a fortune file from your blog posts by performing this query on your blog’s database and writing its output in a text file:
- if you have the
fortune-modpackage perform this command on your previously obtained text file:strfile blog_quotes_text_file blog_quotes.dat
- move
blog_quotes_text_fileandblog_quotes.datto/usr/share/games/fortunessudo cp blog_quotes_text_file blog_quotes.dat /usr/share/games/fortunes
- download my tiny script from here (make it executable) and add it to
cronsetting how often to change your status (in the example this will be done at every 15 minutes). Take a look here for settingcrontabdo handle Pidgin’s status
SELECT Concat("%\n", post_title, " ", DATE_FORMAT(post_date, "http://exampleblog.com/%Y/%m/%d/"), post_name) FROM `YourTablePrefix_posts` where post_type='post'
Add a % (procent sign) at the end of the file, on a separate line.
Now just wait and see.
Update: Python and Pidgin’s status on Ubuntu (Linux)
You might also like:
2 Comments
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»








haha quite neat!
[...] wanted to write this post ever since I’ve read Radu’s Fortune and Pidgin’s status on Ubuntu post. Radu’s approach is quite lame and hard to use, because it relies on the user exporting [...]