10-26-2010, 06:49 PM | #1 |
The LARdT of E-Books
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? |
10-27-2010, 04:26 AM | #2 |
Wizard
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. |
Advert | |
|
10-27-2010, 05:50 AM | #3 |
The LARdT of E-Books
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 |
10-27-2010, 06:01 AM | #4 |
Wizard
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="{"is_category": false, "colnum": 2, "kind": "field", "is_custom": true, "name": "Fachbuch", "#extra#": null, "datatype": "bool", "rec_index": 20, "search_terms": ["#fach"], "#value#": true, "link_column": "value", "label": "fach", "is_editable": true, "column": "value", "is_multiple": null, "category_sort": "value", "table": "custom_column_2", "display": {}}"/> Code:
<meta name="calibre:user_metadata:#name_here" content="settings_here"/> |
10-27-2010, 10:00 AM | #5 |
creator of calibre
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).
|
Advert | |
|
|
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 |