Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 10-28-2020, 06:04 AM   #1
feuille
Connoisseur
feuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enough
 
Posts: 62
Karma: 666
Join Date: May 2020
Location: Germany
Device: android smartphone + tablet
Questions about my first metadata plugin

Hello,
i've build my first calibre plugin for a metadata source. It runs so far, an the data in the debug output looks fine.
However, only some of the standard metadata fields and none of the custom fields are filled in the GUI.
There are some threads about custom metadata, but i'm not shure if there reflects the latest API (i use calibre 5).

'overview' is a dictionary with the collected data from the metadata source.

This works:
Code:
mi.comments = str(overview['Überblick:'])
... and this not:
Code:
mi.publisher = str(overview['Leseprobe:'])
mi.tags = str(overview['Glossar:']).split('/')
mi.tags = [x.strip(' ') for x in mi.tags]
This works:
Code:
mi.set_identifier('pp-id', series_code + issuenumber)
... and this not:
Code:
mi.set('#subtitle', str(overview['Untertitel:']))
mi.set_user_metadata('#subtitle', str(overview['Untertitel:']))
Thanks for any hints!
feuille is offline   Reply With Quote
Old 10-28-2020, 06:45 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You cannot fill custom fields in metadata plugins. Publisher and tags should work fine however.
kovidgoyal is offline   Reply With Quote
Advert
Old 10-29-2020, 11:08 AM   #3
feuille
Connoisseur
feuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enoughfeuille will become famous soon enough
 
Posts: 62
Karma: 666
Join Date: May 2020
Location: Germany
Device: android smartphone + tablet
Hello Kovid,
thanks for the information, it helped a lot.
The standard metadata fields in the GUI were not filled in because a stupid error: the check boxes for these fields in the configuration screen were still disabled.
For the custom fields: is there any plans for such an extension? If not, is there an option to automatically fill in the custom fields from a standard field (all of the data for my custom fields is now in the comments field), for example with a different type of plugin?
Anyway, thanks for this wonderful software!
feuille is offline   Reply With Quote
Old 10-29-2020, 11:12 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,251
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No plans, the issue is that custom columns are different in every users config/every library, so it would require some kind of configuration to map values.

As for copying values from one field to another you can do that via the search/replace tab of the bulk metadata edit dialog.
kovidgoyal is offline   Reply With Quote
Old 10-29-2020, 07:54 PM   #5
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
@feuille: There are a couple of metadata source plugins that get extra data and put it in the standard columns. They delimit it somehow and either have a another plugin to do the move or can use search-and-replace to do it. An example of the plugin pair is Goodreads_rating and Float Rating (F_rating).
davidfor is offline   Reply With Quote
Advert
Old 10-30-2020, 11:27 AM   #6
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 823
Karma: 2536588
Join Date: Jan 2017
Location: Poland
Device: Various
I also recommend METAmover, which can transfer various data from a comment to its custom columns. Perhaps you just need to gently adjust it to your needs.
BeckyEbook is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Metadata Source Plugin] Questions regarding parse select, docs and ref templates Boilerplate4U Development 13 07-07-2020 02:35 AM
[Metadata Source Plugin] Empty Plugin? (Fake Identifier) mneimeyer Plugins 3 11-11-2019 08:07 PM
Regarding using metadata objects in identify method of metadata download plugin api aprekates Development 1 07-06-2014 03:35 AM
metadata download plugin related questions cerda Development 3 07-25-2013 05:16 PM
[Metadata Download Plugin] Goodreads Metadata **Deprecated** kiwidude Plugins 30 04-23-2011 02:10 PM


All times are GMT -4. The time now is 04:45 AM.


MobileRead.com is a privately owned, operated and funded community.