View Single Post
Old 10-01-2022, 08:23 PM   #4
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,731
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Good news - the dev work and documentation for the extensions seems to be (mostly) done.

Before the wall of text begins and your eyes glaze over, I would like two favours from the community:

1. Can some of you kind folks try installing below (Windows users) and offer feedback. Ideally on both functionality and documentation?

2. Are there any icon gurus wanting to contribute something for this? I picked something random off a free site, but something that looks more "calibre-ish" would be nice. I need 16,32,48,128 bit pngs and an svg for just one icon. Is there somewhere else I should ask if they won't see it here?

These should work on Chrome, Chromium, Edge, Firefox, Waterfox G5, Waterfox Classic (tested all of those) and allegedly Thunderbird (untested).

When I have some feedback I will submit to the various marketplaces and that way most of the pain of installation steps below will go away for you (except installing the host application).


First the documentation link which is here:
https://github.com/kiwidude68/calibr...bre-Search-FAQ

That does not however include instructions on how to install the extension itself when not in the marketplace - here are a few pointers of what you need to do:

1. Download the relevent repository as a zip or clone it:
https://github.com/kiwidude68/calibre-search-chrome
https://github.com/kiwidude68/calibre-search-firefox

2. Extract to a folder

3. For Chrome users:
In your address bar type: chrome://extensions/
Turn on Developer mode in the top right
Click on "Load unpacked" in the top left
Navigate to the calibre-search-chrome/addon folder
Click on "Select Folder"
Take a copy of the ID: value, you will need this later.

For Firefox users:
In your address bar type: about:debugging#/runtime/this-firefox
Click on "Load Temporary Add-on"
Navigate to the calibre-search-firefox/addon folder
Double click on the manifest.json file

4. Chrome users need to pin the Calibre Search button to the extensions bar if they want it visible. For Firefox it should just appear.

5. At this point you should just go to the Options page for the extension and follow the documentation in either the Getting Started link within that options page or the FAQ link above. So get the host application installed and your calibre library name set.
Click image for larger version

Name:	ExtensionSettings-Chrome.png
Views:	428
Size:	28.7 KB
ID:	196915
Click image for larger version

Name:	GettingStarted.png
Views:	447
Size:	93.4 KB
ID:	196916

6. Chrome users Because I haven't registered this in the marketplace yet your machine will give the extension a temporary id. You need to copy that id into the following file after you have installed the calibre-search-app above using install-host.bat:
Code:
%localappdata%\com.kiwidude.calibre_search\manifest-chrome.json
The last line in the file has a "chrome-extension://XXX/" value, replace XXX with your ID from the //chrome:extensions page above.

Now you should be able to click on Test connection in the options page and see it go green...

Finally you can now try searching - as shown here I could either select a mix of text and hyperlink, just text or just the hyperlink (the last case will do a search for the text displayed on the hyperlink, e.g. "Wilbur Smith").
Click image for larger version

Name:	SampleMenu.png
Views:	441
Size:	86.0 KB
ID:	196917
So by default this will do a search in calibre of:
PHP Code:
Titans of War by Wilbur Smith 
But with a simple replace expression of either "by" or "/\bby\b/gi" configured the calibre search becomes:
Code:
Titans of War Wilbur Smith
Feedback, thoughts, suggestions welcomed... it was a crazy amount of work and re-work to get this working on all those browsers with all the mess out of there of Manifest V2/V3 and cross-browser stuff... ugh.
kiwidude is offline   Reply With Quote