<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Miljan Karadzic &#187; Pidgin</title>
	<atom:link href="http://www.miljan.org/main/category/pidgin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.miljan.org/main</link>
	<description>Wisdom is the key</description>
	<lastBuildDate>Tue, 25 Jan 2011 22:01:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Pidgin status v2</title>
		<link>http://www.miljan.org/main/2008/10/10/pidgin-status-v2/</link>
		<comments>http://www.miljan.org/main/2008/10/10/pidgin-status-v2/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 19:34:58 +0000</pubDate>
		<dc:creator>miljan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Pidgin]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.miljan.org/main/?p=64</guid>
		<description><![CDATA[As requested by bleketux, I made some modifications to pidgin_status.py script. Main news is that now it is possible to change Pidgin status message periodically. Script will go to background (it is a real daemon now :P), change the status, and wait for the set time interval until it changes the message again, and then [...]]]></description>
			<content:encoded><![CDATA[<p>As requested by bleketux, I made some modifications to pidgin_status.py script.</p>
<p>Main news is that now it is possible to change Pidgin status message periodically. Script will go to background (it is a real daemon now :P), change the status, and wait for the set time interval until it changes the message again, and then all over again, wait-change-wait-change.</p>
<p>To change status message every 5 minutes with a random line from file /home/miljan/quotes/dusko_radovic.txt:</p>
<p class="code">pidgin_status.py -d -t 5 -f /home/miljan/quote/dusko_radovic.txt</p>
<p>And in Pidgin you would get something like this every five minutes:<br />
<a href="http://www.miljan.org/main/wp-content/uploads/2008/10/status.png"><img class="alignnone size-full wp-image-63" title="status" src="http://www.miljan.org/main/wp-content/uploads/2008/10/status.png" alt="" width="264" height="88" /></a></p>
<p>To show the song you are listening to as status message:</p>
<p class="code">pidgin_status.py -s &#8220;Mukeka di Rato &#8211; Kustapassaaessedrmobral&#8221;</p>
<p>And in Pidgin it would look like:</p>
<p><a href="http://www.miljan.org/main/wp-content/uploads/2008/10/status1.png"><img class="alignnone size-full wp-image-65" title="status1" src="http://www.miljan.org/main/wp-content/uploads/2008/10/status1.png" alt="" width="267" height="90" /></a></p>
<p>You can see all possible options by running script with -h argument for help.</p>
<p>bleketux, I hope you are still around to enjoy this. ;)</p>
<p class="download"> Download: <a href="/download/pidgin_status_v2.py">pidgin_status_v2.py</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.miljan.org/main/2008/10/10/pidgin-status-v2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Setting Pidgin Status with Python or How to Waste Perfectly Good Saturday</title>
		<link>http://www.miljan.org/main/2008/03/09/setting-pidgin-status-with-python-or-how-to-waste-perfectly-good-saturday/</link>
		<comments>http://www.miljan.org/main/2008/03/09/setting-pidgin-status-with-python-or-how-to-waste-perfectly-good-saturday/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 23:53:24 +0000</pubDate>
		<dc:creator>miljan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Pidgin]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.miljan.org/main/2008/03/09/setting-pidgin-status-with-python-or-how-to-waste-perfectly-good-saturday/</guid>
		<description><![CDATA[I was very bored today. Tired from working on Ratuus (don&#8217;t go there, site is under heavy construction :)) I needed something to help me take my mind off everything. And what better way to do it, than playing with Python, Pidgin and D-BUS. :D To cut the long story short, I needed something that [...]]]></description>
			<content:encoded><![CDATA[<p>I was very bored today. Tired from working on <a href="http://www.ratuus.org/">Ratuus</a> (don&#8217;t go there, site is under heavy construction :)) I needed something to help me take my mind off everything. And what better way to do it, than playing with Python, Pidgin and D-BUS. :D</p>
<p>To cut the long story short, I needed something that will update my Pidgin status message with the information about the current song I am listening. Till recently I was using Rhythmbox player and there is a perfect little Pidgin plugin called Current Track that worked with this player. Last week I discovered <a href="http://squentin.free.fr/gmusicbrowser/gmusicbrowser.html">gmusicbrowser</a> and fell in love immediately. It is fast, rich with functionalities but still simple to use. Exactly what I want from audio player. (Hm, I just noticed it is written in PERL. Now when Python is used for everything this comes as a big surprise.)</p>
<p>gmusicbrowser already has a plugin called NowPlaying. It will trigger some command whenever song is changed. I just needed to write this command that will inform Pidgin about the change. So, this seemed like a perfect exercise for slow Saturday. :)</p>
<p>Quick search on Pidgin and D-BUS showed extensive documentation about <a href="http://developer.pidgin.im/wiki/DbusHowto">Pidgin API accessible through D-BUS</a>. There is even a working example of how to change the status message! :)</p>
<p>But that was too simple, so I got another idea. Some time ago, I wrote a small daemon in C that will bind to a specific port and display random bofh-excuses fortune messages when someone would telnet to it. (Seems like I have a lot of spare time. I should really find some hobby!) Something similar to telnet bofh.jeffballard.us 666 (<a href="http://pages.cs.wisc.edu/~ballard/bofh/">here</a> for more information). So I was thinking about implementing the same for my Pidgin status. Random BOFH excuses in your status message! How <del>cool</del> geeky is that!</p>
<p>The result of all that is short (~60 lines of code) Python script that will set your Pidgin status message to:</p>
<p>a) you current song</p>
<p class="code">pidgin_status.py -m The Real McKenzies &#8211; Outta Scotch</p>
<p>b) random line from a file</p>
<p class="code">pidgin_status.py -f /usr/local/share/bofh-example</p>
<p>c) anything you give as the command line argument</p>
<p class="code">pidgin_status.py Some very interesting and funny status message</p>
<p>Only difference between a) and c) is the type of the icon that will be shown. In example a) there will be a small musical note, while in example b) and c) nice arrow pointing to right side will be show.</p>
<p>In the middle of testing I noticed this strange message:</p>
<p><img src="http://www.miljan.org/gallery/blog/bofh-rofl.png" /></p>
<p>Being from Serbia myself, I find this extremely funny. Although, I didn&#8217;t know Serbian hackers are so notorious! :)</p>
<p>I hope someone will find it useful. In any case, I am accepting donations for some long and adventurous vacation. As you can see, I really need it! :D</p>
<p class="download"><a href="http://www.miljan.org/download/pidgin_status.py">pidgin_status.py</a><br />
<a href="http://www.miljan.org/download/bofh-excuses">bofh-excuses</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.miljan.org/main/2008/03/09/setting-pidgin-status-with-python-or-how-to-waste-perfectly-good-saturday/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
	</channel>
</rss>

