Wednesday, December 21, 2005

yaBi

Famous beagle-turned-googler Jon Trowbridge commented in the beagle-0.1.3 release notes ... This release also contains our new Python bindings, courtesy of Raphael Slinckx. With them, you can easily access Beagle search results from any Python program. Let the hacking begin...

So, I thought - why not! Following his advice would also be a nice way to say thanks to him. After a few days of effort, I came up with a basic, working version of yet another Beagle (search) interface aka yaBi.

Given my 0-exposure to Gtk and that this will be my first attempt at python (a previous attempt to hack bittorrent source code didnt work out), I chose an easy way out. Copy paste the pybeagle example code into a pykde program. So, yes, sorry to offend other, but this is PyKdeBeagle app. Here is the script and other files which I will keep updated as I find bugs during my daily usage. And for the impatient, here are the screenshots:yaBi starts with the help tab open. It lists the query syntax, what keywords can be used for searching and ways to do complicated query
A search for 'yabi' among all .jpg files. The Summary tab provides a summary of the search like the time taken and number of hits in each category.
Lets check the results among "Files". All the fancy gui stuff is done using the fast and snappy KHtml. All the designing is CSS; which means the result pages are skinnable in an infinite number of ways. Lets check out a particular result:
This one looks like the one I want. Clicking on the filename will open it in the default application. For more, click on "More actions..."
yaBi finds out the associated applications for this mimetype (you know, the ones in the right-click context menu) and show them. Use which ever one you like. Lets try another search, this time for mails on beagle 0.1.3 from Jon between 2005-11-30 and 2005-12-10 (also added source=KMail for fun).
Hmm ... only one result. Lets check that.
I already clicked on the [+] to the left of the subject to expand the properties box. Looks like this is the correct email. Simple to guess, clicking on the subject opens the mail with KMail.

The categories are incomplete and are what I use. I will gradually add the others. I have no clue how to handle IM conversations though - never used them with beagle.

There were some bugs (including some crashers) in pybeagle/libbeagle. Thanks to Joe for fixing them today. Thanks to Raphael for his awesome python bindings for beagle.

And lastly, python is cooooooool.

1 comment:

Anonymous said...

Excellent, love it!
»

Post a Comment