Epilicious is dead, say hello to BMS

With Python being dropped as a language for extensions in epiphany 2.28 I needed to replace epilicious. I tried writing it in JavaScript (seed was integrated in 2.28), but I gave up due to hitting too many hurdles on the way. Instead I decided to rewrite epilicious using Vala and a minimal layer of C.

It turned out to be very doable, despite epiphany’s extension API lacking Vala bindings (Cosimo Cecchi, I’m looking at you :-) ). Basically I did the following setup:

  1. Add the extension following the instructions in Writing Epiphany Extensions by Adam Hooper.
  2. Add a check for valac in configure.ac.
  3. Add a rule in the extension’s Makefile.am to generate a C header file for all the Vala code, for use from C.

Then I started writing the actual extension. I did the minimal amount of work in C, trying to escape as soon as possible into Vala. In the few places I needed to call from Vala into C I would declare a delegate in Vala, and pass a function from Ci.

I call this new version BMS, for bookmark synchronisation. I have a patch for BMS that applies to epiphany 2.28.1. (The file also contain a PKGBUILD in order to delight Arch users :-) )

I should probably point out that while epilicious never could be called polished, BMS is even less so. I might find the time to make it multi-threaded, so that it’s possible to do some sort of progress dialogue, but don’t hold your breath. In the back of my mind is also the thought of rewriting it yet again, in JavaScript/seed.

  1. The format of .vapi files are unknown to me, and I haven’t managed to find much documentation. Using function pointers seemed like an easier way, especially given that I needed this in exactly 3 places.[back]
Share

4 Comments

  1. Pingback: Eetu Huisman (eh) 's status on Thursday, 29-Oct-09 09:46:34 UTC - Identi.ca

  2. Hi, Magnus! Bookmark synchronization (both upper and lower cases) is more than welcome back to Epiphany. Which services are being supported right now? I guess Gnolia, and I’d like to ask you to consider adding Chipmark and Weave. Both have a public API and are open source. I just don’t know how much sense it would make to include Weave because it is supposed to sync more than bookmarks, and the developers are targeting at Firefox only.

  3. @Leonardo, it only supports diigo.com at the moment. Chipmark looks like a future possibiity. I wasn’t even aware that Gnolia existed again, it is also a possibility. Patches are welcome ;)

    It looks like weave is completely different from everything else, and I’m not sure it’d fit with the built-in assumptions on the bookmark storing.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>