![]() |
#1 |
Enthusiast
![]() Posts: 48
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
|
![]()
I noticed that adding custom columns (or even simply shuffling columns around) will add a whole bunch of tags to each and all .opf and to data dumped via "calibredb show_metadata #".
The data seems to contain info about caolums and way of displaying them. Added data also destroys opf formatting, but that's another story. I was wondering why it is so. I would have expected to have some metadata if (and only if) the column is filled for the specific book, displaying shouldn't be in the book metadata. Obviously I'm looking at this from the wrong angle. Can someone enlighten me? TiA |
![]() |
![]() |
![]() |
#2 |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
|
The opf-files can be used to reconstruct a calibre library with a missing or corrupt database. They are collectively a backup for metadata.db. Individually they are a backup of a record in metadata.db.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Assuming you're referring to the metadata.opf files in each book's directory then as Adobe points out they are a fail safe in case of metadata.db corruption. Having these files allows calibre, if needed, to reconstruct the metadata.db file. They have nothing to do with actual book files.
|
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() Posts: 48
Karma: 10
Join Date: Mar 2008
Device: HTC-p3000
|
Got it, thanks.
I assume You're using the same code to output "calibredb show_metadata --as-opf ##" and thus that info appears also there (where it doesn't really belong, does it?) It makes .opf very hard to read, partially because xml formatting gets messed. Thanks |
![]() |
![]() |
![]() |
#5 |
Handy Elephant
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,737
Karma: 26785684
Join Date: Dec 2009
Location: Southern Sweden, far out in the quiet woods
Device: Samsung Galaxy Tab S8 Ultra
|
What information belongs in a opf-file?
The basic information like the one that is stored in calibre, without any custom columns, would perhaps be reasonable? But then opf-files wouldn't have any purpose for epub books. They can store all(?) that information internally. For other formats the opf-file is necessary if you want to move a book from one calibre install to another. A lot of the basic information about a book can't be stored as metadata inside many formats. Yes, for some purposes some opf-files may contain a lot of unnecessary information. Perhaps there should be some setting that allow you to select exactly what to store in the opf-file. But you would have to think up a compelling use case where that would be needed. Until then we have to live with opf-files that store as much information as possible. That is what makes the opf-files suitable as backup of metadata.db. Or manually create a opf-file with just the needed information. |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom columns to call up metadata from epub's opf? | eosrose | Library Management | 1 | 03-21-2013 04:33 AM |
Editing custom columns | JCSullivan | Library Management | 4 | 04-12-2012 01:14 PM |
Custom columns as collections on the T1 | gena0411 | Devices | 9 | 11-10-2011 02:37 PM |
Custom Columns - How are you using yours? | nynaevelan | Library Management | 19 | 04-18-2011 12:42 AM |
0.7.46 and custom columns | meme | Library Management | 4 | 02-21-2011 04:21 AM |