[Metadata Source Plugin] Questions regarding parse select, docs and ref templates
#1  Boilerplate4U 07-06-2020, 08:03 AM
Hi all!

Some questions regarding the metadata plugin:

1. Are there any architecture docs for metadata plugin that describes the overall functionality of in more detail?

2. Is there any similar built in functionally the resembles of the BeautifulSoup selector ("") in the example below:

Html = requests.get(URL)
Soup = BeautifulSoup(Html)
Elements ="#main > product-grid > li:nth-child(1) > article > a")[0]
Href = Elements[0].get('href')
3. Is there a good reference template for the metadata plugin?

Any suggestions are welcome, thanks in advance!

#2  kovidgoyal 07-06-2020, 09:16 AM
1. is irrelevant, all you need to do is subclass and implement identify() and download_cover() methods.

2. beautifulSoup is available in calibre. from calibre.ebooks.beautifulsoup import BeautifulSoup

3. Look at any of th eexisting metadata download plugin

#3  Boilerplate4U 07-06-2020, 09:35 AM
Kovidgoyal, thanks for the prompt reply!

Regarding plugin template, I'd really appreciate if you could recommend some clean implementations since the plugins I've seen so far were a bit to much spaghetti :-)

Btw, are there any simple step by step guides regarding develop, test and deploy?

#4  kovidgoyal 07-06-2020, 10:06 AM
Look for the builtin plugins google and google images are both fairly short and simple. As for how to develop and test, use calibre-customize to develop, see calibre-customize --help and for testing again look at the builtin plugins, near the bottom.

#5  Boilerplate4U 07-06-2020, 10:26 AM

#6  Boilerplate4U 07-06-2020, 10:30 AM
When are you supposed to use "class Worker (Thread)" (in to implement a metadata plugin?

If possible, please move this thread to the correct forum: "E-Book Software > Calibre > Plugins"

#7  kovidgoyal 07-06-2020, 10:37 AM
Never. Again is irrelevant.

#8  Boilerplate4U 07-06-2020, 11:04 AM
Quote kovidgoyal
Never. Again is irrelevant.
Ok. I'm a bit curious as to why almost all metadata-source-plugins that I have looked at so far, utilize the following basic structure (some kind of old methodology or auto generated?)
Plug-import-name goodreads.txt

#9  Boilerplate4U 07-06-2020, 11:20 AM
Just some examples: Mondourania, Goodreads, Skoob Books, Moly_hu, Adlibris, Barnes & Noble, KoboBooks ...

#10  kovidgoyal 07-06-2020, 12:13 PM
Probably because they copy each other. You just need to implement those two methods, thats all. What other files you use is entirely up to you.

  Next »  Last »  (1/2)
Today's Posts | Search this Thread | Login | Register