<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
>

<channel>
	<title>Yabfog &#187; planet</title>
	<atom:link href="http://yabfog.com/blog/tag/planet/feed" rel="self" type="application/rss+xml" />
	<link>http://yabfog.com/blog</link>
	<description>Yet another blog full of gas</description>
	<lastBuildDate>Tue, 17 Apr 2012 18:51:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<cloud domain='yabfog.com' port='80' path='/blog/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Jaiku Planet Venus Filter</title>
		<link>http://yabfog.com/blog/2008/03/12/jaiku-planet-venus-filter</link>
		<comments>http://yabfog.com/blog/2008/03/12/jaiku-planet-venus-filter#comments</comments>
		<pubDate>Thu, 13 Mar 2008 03:27:36 +0000</pubDate>
		<dc:creator>Dan</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[jaiku]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[venus]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://yabfog.com/wp/2008/03/12/jaiku-planet-venus-filter</guid>
		<description><![CDATA[Just started exploring Jaiku and, coincidentally, Planet Venus. One of the cool things about Jaiku is that it aggregates your other web presences (like your blog, twitter, del.icio.us, and flickr posts) and integrates them into Jaiku presence stream. The down side of this is that it's not as good at that as Planet Venus, and [...]]]></description>
			<content:encoded><![CDATA[<p>Just started exploring <a href="http://danmactough.jaiku.com/">Jaiku</a> and, coincidentally, <a href="http://www.intertwingly.net/code/venus/">Planet Venus</a>. One of the cool things about Jaiku is that it aggregates your other web presences (like your blog, twitter, del.icio.us, and flickr posts) and integrates them into Jaiku presence stream. The down side of this is that it's not as good at that as Planet Venus, and then if you use Planet Venus to create a aggregation of your web presences and you include Jaiku, then you've got annoying duplication.</p>
<p>So, I'm not much of a Python programmer, but I wrote this <a href="http://yabfog.com/files/fix_jaikus.py">Planet Venus filter</a> that looks at each entry, and if it detects that it's a Jaiku presence update, it only includes it if it originated via Jaiku. In other words, it filters out all the duplicates.</p>
<p>If you understood any of that, you may find this helpful. If not, nevermind.</p>
<p><code><br />
"""<br />
For jaiku presence entries, only retain entries that originate from jaiku<br />
(as opposed to grabbed via web feeds)<br />
"""<br />
import sys, xml.dom.minidom<br />
entry = xml.dom.minidom.parse(sys.stdin).documentElement<br />
entry_id = entry.getElementsByTagName('id')[0].firstChild.data<br />
for node in entry.getElementsByTagName('link'):<br />
  if node.getAttribute('rel') == 'alternate':<br />
    entry_link = node.getAttribute('href')<br />
    break<br />
if entry_id.find('jaiku.com/presence') &gt; 0 and (entry_id != entry_link):<br />
  sys.exit(1)<br />
print entry.toxml('utf-8')<br />
</code></p>
<p><em>(Updated to fix a bug on line 11.)</em></p>
]]></content:encoded>
			<wfw:commentRss>http://yabfog.com/blog/2008/03/12/jaiku-planet-venus-filter/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
	</item>
	</channel>
</rss>

