Jaiku Planet Venus Filter

12 March 2008

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 then if you use Planet Venus to create a aggregation of your web presences and you include Jaiku, then you've got annoying duplication.

So, I'm not much of a Python programmer, but I wrote this Planet Venus filter 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.

If you understood any of that, you may find this helpful. If not, nevermind.


"""
For jaiku presence entries, only retain entries that originate from jaiku
(as opposed to grabbed via web feeds)
"""
import sys, xml.dom.minidom
entry = xml.dom.minidom.parse(sys.stdin).documentElement
entry_id = entry.getElementsByTagName('id')[0].firstChild.data
for node in entry.getElementsByTagName('link'):
if node.getAttribute('rel') == 'alternate':
entry_link = node.getAttribute('href')
break
if entry_id.find('jaiku.com/presence') > 0 and (entry_id != entry_link):
sys.exit(1)
print entry.toxml('utf-8')

(Updated to fix a bug on line 11.)

Juice-y Python

21 June 2007

I use Juice to manage my podcasts. But it doesn't do everything I need, and it's a little buggy, and I want to learn Python anyway. So I decided to download the latest source code and see if I could fix some of the bugs I've noticed and figure out how to extend it to do everything I need.

So step one was just getting to a point where I could compile it. The source code documentation is incomplete, so here's what I did, starting from scratch.

  1. Install Python 2.5.1
  2. Install pywin32 (I'm on Windows)
  3. Install mfc71.dll (needed by pywin32)
  4. Install py2exe (needed to compile Python source code to executable bytecode)
  5. Install wxPython (for the gui)
  6. Install pysqlite (may not be necessary, but I knew I'd need it eventually)
  7. Install NSIS (Nullsoft Scriptable Install System)
  8. Install NSIS FindProcDLL plug-in

PHEW!

Juice v.2.2.3.djm After all of that, it was actually fairly easy to build and install. However, I made the mistake of trying to upgrade the Universal Feed Parser, only to find that although Juice would still compile, install and run, it was silently crapping out while trying to read feeds so it would not actually update my podcasts. I reverted back to the version of UFP bundled with Juice and everything was fine (except for the UFP bugs I was hoping to have solved by using a later version, of course).

I should update this as things progress.