Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-26-2010, 06:49 PM   #1
LARdT
The LARdT of E-Books
LARdT began at the beginning.
 
LARdT's Avatar
 
Posts: 106
Karma: 46
Join Date: Dec 2009
Device: HANLIN V3ext (Papyre 6.1)
Metadata definition for a user-defined field

I want to define a metadata field in content.opf in such a way that when I press the "read metadata from book" option the metadata content will be inserted into a user-defined field called "#version_css".

How must I define the metadata field in content.opf?
LARdT is offline   Reply With Quote
Old 10-27-2010, 04:26 AM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
You could try going the opposite way: Create a custom column #version_css, add some value to a book, wait for Calibre to create the .opf file. Then, dissect the file to find out how to do it.

Edit to add: I don't know, however, if Calibre even tries to read user defined metadata fields while importing.
Manichean is offline   Reply With Quote
Advert
Old 10-27-2010, 05:50 AM   #3
LARdT
The LARdT of E-Books
LARdT began at the beginning.
 
LARdT's Avatar
 
Posts: 106
Karma: 46
Join Date: Dec 2009
Device: HANLIN V3ext (Papyre 6.1)
Well, I've tried that already. And I don't seem to be able to trigger the metadata writing-back to the file.
Could you please try it yourself and detail the procedure?

Thanks
LARdT is offline   Reply With Quote
Old 10-27-2010, 06:01 AM   #4
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
For the custom column in my library, I'm seeing the following entry in the OPF:
Code:
        <meta name="calibre:user_metadata:#fach" content="{&quot;is_category&quot;: false, &quot;colnum&quot;: 2, &quot;kind&quot;: &quot;field&quot;, &quot;is_custom&quot;: true, &quot;name&quot;: &quot;Fachbuch&quot;, &quot;#extra#&quot;: null, &quot;datatype&quot;: &quot;bool&quot;, &quot;rec_index&quot;: 20, &quot;search_terms&quot;: [&quot;#fach&quot;], &quot;#value#&quot;: true, &quot;link_column&quot;: &quot;value&quot;, &quot;label&quot;: &quot;fach&quot;, &quot;is_editable&quot;: true, &quot;column&quot;: &quot;value&quot;, &quot;is_multiple&quot;: null, &quot;category_sort&quot;: &quot;value&quot;, &quot;table&quot;: &quot;custom_column_2&quot;, &quot;display&quot;: {}}"/>
This is a tristate binary column. From that, I'm guessing that user defined columns are stored in metadata entries of the form
Code:
<meta name="calibre:user_metadata:#name_here" content="settings_here"/>
I'm also seeing that extracting the settings would take quite a bit of matching.
Manichean is offline   Reply With Quote
Old 10-27-2010, 10:00 AM   #5
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: 43,844
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
click the arrow next to the calibre icon and choose library maintenance->start metadata backup to cause a refresh of all opf files (I'd suggest creating a small custom library to play with it).
kovidgoyal is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggestion: Selecting a user-defined Category should show all of the books in it Daemon Calibre 6 08-23-2010 01:19 PM
For Charles/Chaley Merging user defined metadata Starson17 Calibre 20 07-22-2010 10:27 AM
User Defined Columns jjansen Calibre 3 03-17-2010 05:33 PM
User Defined Fonts gr8npwrfl Ectaco jetBook 1 01-21-2010 08:35 AM
metadata language field not after convertlit Wimvv Workshop 3 12-06-2007 04:54 AM


All times are GMT -4. The time now is 12:31 AM.


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