05-22-2017, 04:29 PM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: May 2014
Device: many
|
Can't find info on store plugins.
I want to write a plugin that would allow to extract a book from remote database and copy it into Calibre library. Could I please get advise on how to best implement it?
I think I should use a store plugin to avoid creating my own GUI with the same functionality. But I can not find info on their API or a source code of one to use as a sample. They are not on Plugins subforum, where are they? Do I provide myself or can I override the "Download" command functionality? Because I will not have a straight URL and would have to decode the file first. Finally, if I have a name of a local file in plugin, can I use some Calibre commands to check if it is a book and read its metadata without adding it to the library, or would I have to implement it myself? Thanks. |
05-22-2017, 04:48 PM | #2 |
Junior Member
Posts: 7
Karma: 10
Join Date: May 2014
Device: many
|
Correction
I meant to say, I have not found description of store plugin API and use a source code of one as an example.
|
Advert | |
|
05-22-2017, 10:38 PM | #3 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The API for store plugins is trivial, look in the calibre source code in the stores/ directory
|
05-23-2017, 12:02 AM | #4 |
Junior Member
Posts: 7
Karma: 10
Join Date: May 2014
Device: many
|
Yes, I have seen them and got the basics, thanks. Let me clarify my question. I do the search and get the results, but there are no direct download links. Instead I have to decode data myself to retrieve a book file.
|
05-23-2017, 12:10 AM | #5 |
creator of calibre
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Store plugins can do only one thing, provide a list of results after searching a website. You want to do all the other things, you need to create a user interface plugin.
And as for APIs to add books to calibre and read metadata, they are present and can be used from user interface plugins. Simply use one of the methods from self.gui.iactions['Add Books'] (which is the Add Books builtin user interface plugin) to add a file to calibre, reading metadata etc is handled automatically. |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to find copyright info on WW2 book? | crankypants | Workshop | 3 | 12-31-2015 04:41 PM |
Where would I find info about . . . | crich70 | Writers' Corner | 4 | 09-17-2014 03:52 PM |
Can't find my plugins? | Kraftwerk | Plugins | 2 | 10-12-2011 05:07 PM |
Calibre can't find zipped plugins | Henry Flower | Calibre | 2 | 06-14-2011 11:10 AM |