Hello, I have decided to make a very simple but useful plugin for calibre.
The idea is simple, I use recoll -t option to search in "Calibre Library" directory for documents, which contain a phrase you want to find.
The Plugin will have a simple structure.
1. Button to update the recoll index
2. a place to input the text you want to search (possible also with AND and OR)
3. Run the search
It is not a accurate method but I am not a programmer so just want to combine this two programs in a way, I can use them best.
I search for the (id) tag in the results from recoll stdout and want to update the gui table with the books with this ids.
Now I have some questions:
1) when do this numbers change or do they change after a book is deleted or added or something else (a not so important question because you can just update the recoll database every time you make some changes).
2) I want to check the actual filter (books actually shown in calibre) and compare the ids to my search from recoll. Then I can display only the results matching both filters and you can combine calibre filter and recoll. For this I want to know where to find all the information how to use different methods for example for the LibraryDatabase2 Calss. I even cant find which methods exist.
Something in that sort of code is the thing I need:
Code:
# Mark the records with the matching ids
self.db.set_marked_ids(matched_ids)
# Tell the GUI to search for all marked records
self.gui.search.setEditText('marked:true')
self.gui.search.do_search()
The only thing I have looked at is the example plugin and some .py of the db folder. I have no idea how to get the informations.
Well, if someone could help, it would be very nice.
PS: For someone who is a better programmer recoll has a python API, too. Maybe combine this two programs that way could solve the missing feature of having a full text search finally.
Thanks