<?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"
	>

<channel>
	<title>The Snailbyte Weblog &#187; KDE</title>
	<atom:link href="http://www.snailbyte.com/category/kde/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snailbyte.com</link>
	<description>Company news along with technology and business trends.</description>
	<pubDate>Wed, 03 Sep 2008 14:09:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Campfire activity notifier for KDE</title>
		<link>http://www.snailbyte.com/2007/09/13/campfire-activity-notifier-for-kde/</link>
		<comments>http://www.snailbyte.com/2007/09/13/campfire-activity-notifier-for-kde/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 10:20:50 +0000</pubDate>
		<dc:creator>Geir</dc:creator>
		
		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Ruby or Rails]]></category>

		<guid isPermaLink="false">http://www.snailbyte.com/2007/09/13/campfire-activity-notifyer-for-kde/</guid>
		<description><![CDATA[<p>Campfire is a web-based chat product from 37Signals. One thing bothered me with using it as a development chat channel: I want to be notified of messages visually instead of checking for them.</p>

<p>Kathy Sierra once wrote an excellent post on the addiction to email-checking. The same goes for Campfire, constantly checking it for new messages [...]</p>
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.campfirenow.com">Campfire</a> is a web-based chat product from 37Signals. One thing bothered me with using it as a development chat channel: I want to be notified of messages visually instead of checking for them.</p>

<p>Kathy Sierra once wrote an excellent post on the <a href="http://headrush.typepad.com/creating_passionate_users/2006/03/clicker_trained.html">addiction to email-checking</a>. The same goes for Campfire, constantly checking it for new messages can drive you insane.</p>

<p>Solution? <a href="http://opensoul.org/2007/1/27/tinder-listening-is-just-as-important-as-speaking">Tinder</a>.</p>

<p>Install Tinder and run the following ruby script:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="ruby"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'tinder'</span>
campfire = <span style="color:#6666ff; font-weight:bold;">Tinder::Campfire</span>.<span style="color:#9900CC;">new</span> <span style="color:#996600;">'your_domain'</span>
campfire.<span style="color:#9900CC;">login</span> <span style="color:#996600;">'your_login'</span>, <span style="color:#996600;">'your_password'</span>
room = campfire.<span style="color:#9900CC;">find_room_by_name</span> <span style="color:#996600;">'Development'</span>
<span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">knotify</span> title, msg
  <span style="color:#008000; font-style:italic;"># shows message on screen</span>
  <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;dcop knotify default notify eventname <span style="color:#000099;">\'</span>#{title}<span style="color:#000099;">\'</span> <span style="color:#000099;">\'</span>#{msg}<span style="color:#000099;">\'</span> '' '' 16 2&quot;</span>
  <span style="color:#008000; font-style:italic;"># plays alarm sound</span>
  <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;dcop knotify default notify eventname <span style="color:#000099;">\'</span>#{title}<span style="color:#000099;">\'</span> <span style="color:#000099;">\'</span>#{msg}<span style="color:#000099;">\'</span> '/usr/share/sounds/KDE_Error_2.ogg' '' 1 2&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
room.<span style="color:#9900CC;">listen</span> <span style="color:#9966CC; font-weight:bold;">do</span> |m|
  <span style="color:#9966CC; font-weight:bold;">if</span> !m.<span style="color:#0000FF; font-weight:bold;">nil</span>? <span style="color:#9966CC; font-weight:bold;">and</span> m<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:message</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">size</span> &gt; <span style="color:#006666;">1</span>
    knotify<span style="color:#006600; font-weight:bold;">&#40;</span>m<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:person</span><span style="color:#006600; font-weight:bold;">&#93;</span>, m<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:message</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#CC0066; font-weight:bold;">gsub</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;'&quot;</span>,<span style="color:#996600;">&quot;&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#008000; font-style:italic;"># knotify doesn't like this character</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>


<p>Note that the script currently works for KDE only, but the <code>knotify</code> method could be replaced with a call to Growl for Apple users. Also, it&#8217;s best to use a login name that is already on the channel so the bot doesn&#8217;t get kicked out of the chat room after being inactive.</p>

<p>We&#8217;ve also used Tinder to hook Campfire up with <a href="http://subversion.tigris.org">Subversion</a>, <a href="http://trac.edgewall.org">Trac</a> and <a href="http://www.capify.org">Capistrano</a>. </p>

<p>Sweet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snailbyte.com/2007/09/13/campfire-activity-notifier-for-kde/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Autotest notifications in KDE using DCOP and KNotify</title>
		<link>http://www.snailbyte.com/2006/08/24/rails-autotest-growl-notification-using-dcop-and-knotify/</link>
		<comments>http://www.snailbyte.com/2006/08/24/rails-autotest-growl-notification-using-dcop-and-knotify/#comments</comments>
		<pubDate>Thu, 24 Aug 2006 17:06:03 +0000</pubDate>
		<dc:creator>Geir</dc:creator>
		
		<category><![CDATA[KDE]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Ruby or Rails]]></category>

		<guid isPermaLink="false">http://www.snailbyte.com/2006/08/24/rails-autotest-growl-notification-using-dcop-and-knotify/</guid>
		<description><![CDATA[<p>I recently came across a killer ruby application called autotest, which is part of a package called  Zentest.</p>

<p>Geoffrey Grosenbach&#8217;s Nuby on Rails blog explains how to use autotest with Rails. It&#8217;s pretty simple, install Zentest:</p>

<p>gem install ZenTest</p>

<p>and from the Rails project&#8217;s root, type:</p>

<p>autotest -rails</p>

<p>Monitoring a console for failed tests is annoying and keeping an [...]</p>
]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://snailbyte.com/ftpuploads/tests-failed.png" alt="Tests failed warning window" /></p>

<p>I recently came across a killer ruby application called autotest, which is part of a package called  <a href="http://www.zenspider.com/ZSS/Products/ZenTest/">Zentest</a>.</p>

<p>Geoffrey Grosenbach&#8217;s <a href="http://nubyonrails.topfunky.com">Nuby on Rails blog</a> explains <a href="http://nubyonrails.topfunky.com/articles/2006/04/19/autotest-rails">how to use autotest with Rails</a>. It&#8217;s pretty simple, install Zentest:</p>

<p><code>gem install ZenTest</code></p>

<p>and from the Rails project&#8217;s root, type:</p>

<p><code>autotest -rails</code></p>

<p>Monitoring a console for failed tests is annoying and keeping an open console on-screen is too screen real-estate expensive on a 14 inch laptop. Enter KNotify and DCOP.</p>

<p>Create a file called .autotest in your home directory and paste the following code into it:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="ruby"><span style="color:#008000; font-style:italic;">#!/usr/bin/ruby</span>
<span style="color:#9966CC; font-weight:bold;">module</span> KDENotify
  <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">knotify</span> title, msg
    <span style="color:#CC0066; font-weight:bold;">system</span> <span style="color:#996600;">&quot;dcop knotify default notify &quot;</span> +
           <span style="color:#996600;">&quot;eventname <span style="color:#000099;">\'</span>#{title}<span style="color:#000099;">\'</span> <span style="color:#000099;">\'</span>#{msg}<span style="color:#000099;">\'</span> '' '' 16 2&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  Autotest.<span style="color:#9900CC;">add_hook</span> <span style="color:#ff3333; font-weight:bold;">:red</span> <span style="color:#9966CC; font-weight:bold;">do</span> |at|
    knotify <span style="color:#996600;">&quot;Tests failed&quot;</span>, <span style="color:#996600;">&quot;#{at.files_to_test.size} tests failed&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>


<p>Once autotest is started and coding has commenced, a passive pop-up window will appear as soon as a saved file has caused a test to fail.</p>

<p>This is all made possible by autotest&#8217;s excellent design along with the genius that is KDE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.snailbyte.com/2006/08/24/rails-autotest-growl-notification-using-dcop-and-knotify/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
