
yaBi - beagle search client
Source (link to git-repo or to original if based on someone elses unmodified work):
interface to find information from beagle.
yaBi uses snappy KHTML to display results, CSS for designing and super-fast
beagle-python bindings to retrieve search results. It uses kde preview service
to display thumbnails and also shows kde-associated applications for results.
To run, download the file,
$ tar zxvf yabi-0.6.1.tar.gz
$ cd yabi-0.6.1
$ ./yabi.py
(Help Wanted: Packaging python applications)
--------------------------------------
Features:
* Separation of search results into categories like Music, Pictures, RSS, Webhistory, Other files, Mails etc. and showing them in different tabs.
* Summary tab to show the time taken to query, search result summary.
* Formatting of search result done using CSS (and some javascript). Change yabi.css and yabi.js to suit your taste.
* Shows indexed information about results e.g. time when indexed, full path, title (if any), sender (if mail) etc.
* Shows relevant actions (according to the users KDE associations) and standard actions like open in terminal, reveal in konqueror, send as email-attachment.
* Shows thumbnail (on-demand, as thumbnail generation can be slow for certain files).
* Retrieves snippets from beagle in background and displays them when requested.
* Clusters webhistory results into websites and emails into conversations. This helps a lot when the user knows what website/email-conversation might be of interest.
* User can use keyword queries to search specific metadata like extension or sender email-address. Also, allows various specifiers to restrict query by dates, source, type etc.
* It should be clear by now that beagle allows an elaborate query syntax to fetch you just the information you need. There is a easy-accessible help tab which explains the syntax in great detail.
* Information tab to show current beagle status and index information.
* Allow starting/stopping of beagle daemon from the GUI.
* Save queries in bookmarks.
---------------------------------------
Requirements:
* beagle >= 0.2.0 with libbeagle and python-bindings enabled
- (libbeagle and python-bindings require glib-2.6-devel, libxml-2.6.19-devel and pygtk2-2.6-devel)
* PyKDE (I used Oct-13-2005 snapshot)
---------------------------------------------------------------------------
About Beagle:
Beagle is a utility to comb personal data which can be used to find whatever
you are looking for. Beagle in itself doesnt have a GUI (so its not correct to call it a gnome-application). It provides
C/C#/python api for clients.
beagle-0.2.1 provides a build option (./configure --disable-gui --enable-libbeagle --enable-python ...) which builds core beagle with python bindings.
Besides searching among files, beagle can also store information about
* kopete chat sessions
* akregator (pre kde-3.5) rss feeds
* kmail emails konqueror
* webbrowsing history
Writing plugins for beagle is fairly simple, for information on that and more, visit http://beagle-project.org/Main_Page
If you dislike some feature, have any suggestions, hate my python coding style or have fixes for bugs (I am sure there are many), please email them to me at dbera.web_NOSPAMat_gmail.com. If you are a CSS/UI expert, then I would love to hear your suggestions.
v 0.6.1 (Feb 2, 2006):
* Fixed a crash in snippet retrieval which also fixes a memory leak
* Explicitly deny documentation and IM queries since we dont have any means of displaying them
v 0.6 (Jan 31, 2006):
* Feedback from Joel, changed UI, removed unneeded items
* No need to display unnecessary information in the hits
* Some CSS fixes and changes
* Fixed a bug when no results were returned for some query and next query would block
* Added "bookmark" feature to save query
* Added "source", "type" selection lists (they dont work due to a bug in Beagle)
* Added ability to start/stop beagle from yaBi
* Use passive-popup to inform the user when query finishes
* General code cleanup
* Improve summary presentation
* If thumbnail is not available, try to show the mimetype icon. Better
than nothing.
v 0.5 (Jan 22, 2006):
* Create and display conversation for email hits
* Cluster web-hits by website
* Cosmetic cleanup
* Moved license from "public-domain" to MIT
* Artistic touches to beagled-not-running, no results found pages
* Display all properties for files
* Show all entries in To and Cc fields of email results
* Some CSS changes to make it look better
* Display RSS Feed results
* Added actions for music hits
* Store recent search history, window dimensions and positions across sessions
(skipping 0.4, somehow it never got released)
v 0.3 (Jan 5, 2006):
* Fixed non-english query and results
* Fixed icon paths (made them relative to script location)
v 0.2 (Dec 25/26, 2005):
* Added snippets
* Added thumbnail
* Added javascript to hide snippets until I want them - they look ugly
* Added category for pictures
* Fixed UTC time issues
v0.1.1 (Dec 24, 2005):
* Added status information
* Added send file
v0.1 (Dec 20, 2005):
* More or less works
Ratings & Comments
31 Comments
One bug I found and I couldn't find any other place on this site to report it, so I'm posting here. If one of my search results is situated in a folder with has a space in its name (say for ex. "to do"), then clicking on "show in folder" button for that search result opens a small error window with title "Sorry - konqueror" and contents "The file or folder file:///home/elaina/to does not exist." After clicking OK button, konqueror opens with a blank tab. However clicking other buttons like kwrite, emacs and kate (I tried this for a result which was a text file) works perfectly.
After starting yabi.py I get an error saying: File "./yabi.py", line 74, in ? import beagle ImportError: No module named beagle phython-beagle and the kde bindings for python (python-kde3) are installed (i'm using debian-kanotix), so what else can I do? thx, urlauber
Essentially - both... ;-) Want to help me in klikifying Beagle and yaBi?
Is it possible to compile this statically, so that it runs on a decent number of users' existing systems out there? No one wants to mess up their production systems with unstable dependencies. Possibly c++ is more suitable to create binaries that actually run on users' systems than this type of application you need a PhD for to get it working...
Sorry you lost me :) Are you talking about yaBi - which is a python script and has the usual kde dependencies and pykde ? Or you are talking about beagle - which is a dependency beast ? (I dont disagree either of the questions, btw) I smell a klikable beagle in the air 8-P
yabi 0.6.1 with all punblished yabi versiones I get this on a SUSE 10.0 ./yabi.py Traceback (most recent call last): File "./yabi.py", line 63, in ? from kio import KRun, KTrader, KService, KIO, KMimeType ImportError: /usr/lib/python2.4/site-packages/kio.so: undefined symbol: _ZN13KServiceGroup11SuSEentriesEbbbbb
_ZN13KServiceGroup11SuSEentriesEbbbbb ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some incompatibility between your KDE and PyKDE :( I dont have SuSE, so cant really help. Did you use a SuSE pykde-package or a generic one ? Maybe compiling PyKDE will help (its not that difficult to build). You might also be able to get some more input in the pykde mailing list. The error happens in "import kio" and is _not_ a fault of yaBi, so pykde should be able to help.
Here's another one. I used a different search term, the search completed, and after a few seconds of looking at the summary (didn't click anything or even move the mouse), it crashed. Terminal: $ python2.3 yabi.py Unhandled exception in thread started by Traceback (most recent call last): File "yabi.py", line 1260, in print_snippets fetch_and_print_snippets (hitlist, box) File "yabi.py", line 1280, in fetch_and_print_snippets response = client.send_request (snippet) gobject.GError: Exception has been thrown by the target of an invocation. KCrash: Application 'yabi.py' crashing... Backtrace: (no debugging symbols found) Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1210616128 (LWP 15485)] [New Thread -1275548752 (LWP 15500)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) 0xffffe410 in __kernel_vsyscall () #0 0xffffe410 in __kernel_vsyscall () #1 0xb7ee5da0 in sem_wait@GLIBC_2.0 () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb7d776a0 in ?? () #3 0x080dd10e in PyThread_acquire_lock () #4 0x080b1aa1 in PyEval_RestoreThread () #5 0x080d7659 in PyGILState_Ensure () #6 0xb77bee3e in sip_api_wrapper_check () from /usr/lib/python2.3/site-packages/sip.so #7 0xb5bfb780 in sipKApplication::notify () from /usr/lib/python2.3/site-packages/kdecore.so #8 0xb6eb25e5 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3 #9 0xb6f1398c in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3 #10 0xb6ec635c in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 #11 0xb6f3ada2 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3 #12 0xb6f3accb in QEventLoop::exec () from /usr/lib/libqt-mt.so.3 #13 0xb6f21225 in QApplication::exec () from /usr/lib/libqt-mt.so.3 #14 0xb62cf6c3 in sipQApplication::sipEmit_guiThreadAwake () from /usr/lib/python2.3/site-packages/qt.so #15 0x080b6ca4 in PyEval_GetFuncName () #16 0x080b8417 in PyEval_EvalCodeEx () #17 0x080b8695 in PyEval_EvalCode () #18 0x080d935c in PyRun_FileExFlags () #19 0x080d9623 in PyRun_SimpleFileExFlags () #20 0x08054fc7 in Py_Main () #21 0xb7d8deb0 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6 #22 0x080549a1 in _start ()
There is a known bug in the code. Possibly the problems you are seeing are because of that. I have a fix for that, but I am waiting to finish some more changes. I will definitely put up another version by the beginning of next week. Please bear with me till that.
I do a search, the result summary shows up, and after a couple seconds, it crashes. Happens every time the same way. Log and backtrace follow... (I had to use the HTML for the less-than sign to get it to show up here.) Terminal: $ python2.3 yabi.py QFont::setPixelSize: Pixel size <= 0 (0) QFont::setPixelSize: Pixel size <= 0 (0) terminate called after throwing an instance of 'DOM::DOMException' KCrash: Application 'yabi.py' crashing... Backtrace: (no debugging symbols found) Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". (no debugging symbols found) (no debugging symbols found) [Thread debugging using libthread_db enabled] [New Thread -1209882944 (LWP 15340)] [New Thread -1274647632 (LWP 15356)] (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) (no debugging symbols found) 0xffffe410 in __kernel_vsyscall () #0 0xffffe410 in __kernel_vsyscall () #1 0xb7f98da0 in sem_wait@GLIBC_2.0 () from /lib/tls/i686/cmov/libpthread.so.0 #2 0xb7e2a6a0 in ?? () #3 0x080dd10e in PyThread_acquire_lock () #4 0x080b1aa1 in PyEval_RestoreThread () #5 0x080d7659 in PyGILState_Ensure () #6 0xb7871e3e in sip_api_wrapper_check () from /usr/lib/python2.3/site-packages/sip.so #7 0xb5cae780 in sipKApplication::notify () from /usr/lib/python2.3/site-packages/kdecore.so #8 0xb6f655e5 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3 #9 0xb6fc698c in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3 #10 0xb6f7935c in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3 #11 0xb6fedda2 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3 #12 0xb6fedccb in QEventLoop::exec () from /usr/lib/libqt-mt.so.3 #13 0xb6fd4225 in QApplication::exec () from /usr/lib/libqt-mt.so.3 #14 0xb63826c3 in sipQApplication::sipEmit_guiThreadAwake () from /usr/lib/python2.3/site-packages/qt.so #15 0x080b6ca4 in PyEval_GetFuncName () #16 0x080b8417 in PyEval_EvalCodeEx () #17 0x080b8695 in PyEval_EvalCode () #18 0x080d935c in PyRun_FileExFlags () #19 0x080d9623 in PyRun_SimpleFileExFlags () #20 0x08054fc7 in Py_Main () #21 0xb7e40eb0 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6 #22 0x080549a1 in _start ()
Running Debian with python2.4=2.4.2-2, I get a segfault. I got it working with Python 2.3 though. Any plans to package this for Debian?
The segfault is weird unless it is the one you mention below. In future crashes, it will be helpful, if you run yabi with --debug parameter. Paste the output to some file and email it to me - I'll appreciate it. I posted 0.6.1 - which attempts at fixing the bug. About debian packaging, I am exploring the python options for packaging. I dont want to take the autotools approach, its too complicated; I dont like the PyKDE extension either, since it means a dependency. If there are any suggestions, let me know. I have no prior experience in python packaging. TIA, -d.
Could you please re-arrange your changelog so that newer entries/versions appear on the top? Thanks.
Great little tool! I just upgraded Beagle 0.13 to 1.4-8, and for a reason I have not been able to dig out (grr!), lost the Best GUI. While yaBi is not quite a match aesthetically, functionally it is fine. More importantly, doesn't require all the Gnome stuff that Best does. Now if I could just easily figure out all the Gnome sw to uninstall since I'm not using Best . . .
Yup. yaBi is not _as_pretty_ as Best (or the upcoming beagle-GUI called Holmes). And the reason is totally my inability to design and handle aesthetics. The display area is designed totally using CSS (yabi.css). If anybody who knows some CSS and has better sense of UI design (I lack both of these, sadly) can contribute a better CSS file, that will be very helpful.
That aside, yaBi is order of magnitude faster than Best, and is able to provide KDE associations for results. At least these were the 2 main motivations.
If you want to remove all the gnome-ness ... you can actually build beagle without gnome-sharp and family. Read the last paragraph of http://dbera.blogspot.com/2005/12/yabi-02-update.html for more information.
Thanks for your appreciation, - d.
To be honest, while I do appreciate your efforts and I think that a beagle KDE front-end is a *great* idea (kudos to you), I think that yabi currently has some huge usability flaws, apart from aestethics. For example, why would you show the different type of result in differents tabs? It's meant to be a searching tool, the results must be right in your face. Now you search and thinks: well, where is my result? Moreover there are too many tech details exposed. Who cares about email charset encoding?? I think you should submit your app to openusability.org for a full usability review, and commit the suggestions you will surely receive. Please take it as positive criticism. :)
kewl app.. . any chance you'd wanna integrate this into konqueror? like those tabs on the side??? :D
Integration into konqueror "sounds nice" but what would you like to see integrated ? beagle functionality (so tat you can search using konqueror ?) - there is a beagle kio-slave for that. Other than that, my imagination didnt give help any further :( (the "tab" part ? BTW, the tab idea was taken from metabar).
oh, a kio-slave for beagle? didn't know this.. . enx for the info... :D
I cant start it, I get allways this error: -------------------------------------- ./yabi.py Traceback (most recent call last): File "./yabi.py", line 48, in ? import pykdeconfig ImportError: No module named pykdeconfig -------------------------------------- What have I to install? I'm working with Debian (Kanotix)
Do you have PyKDE installed ? http://www.riverbankcomputing.co.uk/pykde/download.php
ubs, no :( I Installed them now with: apt-get install python-kde3 python-qt3 Now it searchs but no results are showed. All Registers are empty.
Do you have beagled running ? 1. You can use the command-line tool beagle-ping to see if beagled is running ? (In future versions, I will add checking, starting and stopping beagled from yaBi). 2. If it is running, try the same query with command line beagle-query (the advanced query syntax for beagle-query is a little different; check it using beagle-query --help) and check the results. If you find no search results even with beagle-query and you believe that the query is correct, then you ran into sum new bug. Please help beagle by following it up in beagle-bugzilla 3. If beagle-query returns results but yaBi doesnt, double check the query syntax for yaBi (if possible paste both yaBi and beagle-query strings here). You might have found a yaBi bug, which is too bad and should be fixed asap.
Sorry, i forgot to say it. Yes, beagled is running and i can search files with beagle-query or best. And I found a small bug in your app: When i search for caco3, the sumary shows me this: ----------------------------------- Result summary Search for caco3 took 0.122873 seconds Total number of results: 20 º Files : 4 º Mails : 16 [..] ----------------------------------- This means, it found 4 files and 16 mails, which seems to be ok. But when I search again for the same word (this means I push ENTER in the Search-line) the summary shows this: ----------------------------------- Search for caco3 took 0.149600 seconds Total number of results: 40 º Files : 8 º Mails : 32 ----------------------------------- It looks like the program does not reset the variables! And nevertheless, the register Files and Mails are still empty. The commandline gives me also this messages, when i search in yaBi: ----------------------------------- ./yabi.py Traceback (most recent call last): File "./yabi.py", line 722, in do_query print_hits ((timeafter*100 - timebefore*100)/100) File "./yabi.py", line 758, in print_hits print_file_hits (filesbox, fileshitlist) File "./yabi.py", line 882, in print_file_hits last_mod_time = hit.get_timestamp ().to_unix_time () AttributeError: 'beagle.Timestamp' object has no attribute 'to_unix_time' ---------------------------------- BTW: I tested yaBi, because best is too slow and I hoped, yaBi is quicker! Is it?
Fist, yaBi is _way_way_ quicker than best (because pybeagle is fast and best relies on gecko which is slow). Second, you are definitely not using beagle-0.1.4 (mentioned in the requirements). The counters are not reset, results not displayed are due to that exception which was fixed in beagle-0.1.4. Make sure your python-beagle bindings are from beagle-0.1.4