![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Nov 2011
Device: Samsung Galaxy Tab
|
Custom columns and epub metadata
Hi to all
I know that installing in Calibre the plugin Modify Epub, and checking the checkbox "Update Metadata (including cover)", you can update your ebooks in epub format with the metadata you have put on Calibre for that ebook. This not only updates standard metadata fields (as author, title and so on) on the file content.opf inside the epub, but also creates custom metadata fields on content.opf in the form: Code:
<meta content="{"is_category": true, "is_editable": true, "kind": "field", "is_custom": true, "name": "Hugo", "#extra#": null, "datatype": "series", "colnum": 3, "rec_index": 22, "search_terms": ["#hugo"], "link_column": "value", "label": "hugo", "is_multiple": null, "column": "value", "#value#": null, "category_sort": "value", "table": "custom_column_3", "is_multiple2": {}, "display": {}}" name="calibre:user_metadata:#hugo" /> My question is if it is possible to do the reverse. I mean: Is it possible to recover this data from an epub to Calibre? Not thinking on creating automatically custom columns for that, (doing that would be a dream, but I understand that thecnically it seems hard to do) but, if I have a Calibre library that includes the same custom colums that correspond to that custom metadata fields in the content.opf file, is there a way to make Calibre to retrieve the values in the custom fields metadata into the corresponding custom columns? Simply matching by name, for example. And only for editable custom columns, calculated custom columns can be recreated on Calibre, but those data stored on custom columns would be lost if the book is exported. As of now, I can't do that on Calibre... I have a book that includes the previous described custom metadata on the file content.opf, I have created a custom column with the same name on the calibre library, but neither when I add the book to the libray or update metada from the epub, that custom column is not populated with the content of the custom metadata in content.opf. So, any idea on how to accomplish this? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,221
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
The only time that calibre reads custom column metadata from OPF files is during a restore library operation, during which it will even re-create missing custom columns.
|
![]() |
![]() |
![]() |
#3 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 10001
Join Date: Feb 2011
Device: sony
|
Restoring some books from a backup (don't ask), here's what I did:
Created a new, empty library. Copied the book folders into the library folder, being careful to produce a valid library folder structure. (Re)built the library with the restore database function. Copied the books into the desired library with the copy to library function. |
![]() |
![]() |
![]() |
#4 | |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Nov 2011
Device: Samsung Galaxy Tab
|
Quote:
The metadadata.opf files created by calibre for each book in the library only contains metadata defined for the corresponding calibre library. As you know, each .epub file contains a "content.opf" file inside, that holds metadata and the files manifest for the epub. That metadata contained in the internal content.opf file is the one I am interested in. Calibre reads that metadata from internal epub content.opf file when adding books to a libray (if you have configured that in preferences , what is the default) but only reads standard metadata, not custom ones. Also calibre recovers stadard metadata from content.opf in .epub when you click the button "Import metadata from selected format", but again, only standard metadata, not custom ones. So, my question is if there is some way to tell calibre to read not only standard metadata from that internal content.opf file but also custom metadata. Again, from the .epub internal content.opf file, not from the external, calibre created, metadata.opf. Best regards |
|
![]() |
![]() |
![]() |
#5 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,914
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
![]() |
![]() |
![]() |
#6 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Nov 2011
Device: Samsung Galaxy Tab
|
I don't see why this should give any validation problem, custom metadata fields on epubs are contemplated on the epub specifications.
And, by the way, Fligthcrew doesn't complain about it. Just tested some epubs with custom metadata and check is OK. |
![]() |
![]() |
![]() |
#7 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,914
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You may be right about Flightcrew. I Know you can't SET a custom field using the Metadata editor of Sigil
|
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,221
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, there is no way to tell calibre to read custom column metadata from inside a book file.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
importing metadata into custom columns | taleia | Library Management | 4 | 10-03-2023 05:56 AM |
Custom columns and metadata sources | kiwidude | Development | 30 | 06-05-2014 01:36 AM |
Custom Columns - How are you using yours? | nynaevelan | Library Management | 19 | 04-18-2011 12:42 AM |
New Metadata class (empty books) and custom columns | kiwidude | Development | 14 | 03-12-2011 06:47 AM |
0.7.46 and custom columns | meme | Library Management | 4 | 02-21-2011 04:21 AM |