A user (Comfy.n) asked about performing calibre searches direct from a browser in the Plugin ideas thread. Being the curious sad person I am I started dabbling with writing a firefox extension to do this using that nice calibre URL scheme stuff:
https://manual.calibre-ebook.com/url_scheme.html
I have something working locally (sticking plasters and bandaids - don't ask me for a copy of it yet). However I don't know if there is a "less clunky" approach possible as I have no idea how I could nicely even package this all up.
The issue is that it seems the only way (or at least the only way I have come across) to actually send that calibre:// url to the "outside" from a browser on your machine is to use browser.runtime.sendNativeMessage(). And that seems to require...
- some running application which will accept/respond using stdin/out the message sending from the browser. e.g. a python script or node.js script. This can then do the actual process launch with the calibre:// url
- a json file manifest defining stuff including the path the above python script/batch to launch it
- registry entries pointing to the json file
https://developer.mozilla.org/en-US/...dNativeMessage
Just curious if any of the fellow geeks in here have dabbled with writing extensions and have any thoughts/alternatives I may be missing?
The fact that I have something running I can use is a partial win for me, but trying to decide whether I bother to tell anyone else it exists and implement the endless list of stuff that would invariably lead to (multi-browser support, multi-os, keyboard shortcuts, toolbar buttons, configuration options, translations etc).