← Back to team overview

zim-wiki team mailing list archive

GNOME Shell search provider for Zim


Hello people!

My first message in the list. I've actually just "joined the team", according to LP anyway.

I have been using Zim for while and it is an amazing productivity tool! I also use GNOME Shell with its great search capabilities. I thought it would be great to be able to search through my Zim notebook directly from Shell search, so I went ahead and developed a very simple search provider [2]. It seems to be working, but I'm very new to almost everything involved: although I have some programming background, I'm new to python, DBUS, GNOME Shell, Zim itself and even Git. I basically did a patchwork of a few tutorials I found about that stuff, so certainly there is much room for improvement.

The workings are very simple: zimsearch.py is a python 3 script that implements a gtk3 application [3]. This app is DBus-activatable [4] and does nothing except creating a DBus object that impements the GNOME Shell search provider API. The service implementation basically spawns "zim --search" with the search terms and parses the stdout. There is some logic to identify the default notebook from notebooks.zim and to override the searched notebook from a special search term (notebook:...). Apart from the script, there are some descriptors to install the provider in DBus and GNOME Shell.

If you would like to try it, I've make a script that installs the files to their directories. It Works For Me, but no guarantees otherwise. Please contact me if you are having trouble with the installation.

Thak you for your time. I would certainly appreciate any feedback!

Best regards,

[1] Soure code: https://github.com/dsboger/zimsearch
[2] https://wiki.gnome.org/HowDoI/SearchProvider
[3] https://wiki.gnome.org/HowDoI/GtkApplication
[4] https://wiki.gnome.org/HowDoI/DBusApplicationLaunching

Follow ups