Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-02-2020, 02:33 AM   #1
stan999
Member
stan999 began at the beginning.
 
Posts: 20
Karma: 24
Join Date: Jul 2019
Device: none
Question Any point to saving the .opf files?

I don't see any use for them whatsoever. I changed settings to ignore cover and .opf files. I'm convinced these are implemented for a reason, which one would that be?
stan999 is offline   Reply With Quote
Old 03-02-2020, 03:32 AM   #2
yonkyunior
Cultivator
yonkyunior doesn't litteryonkyunior doesn't litteryonkyunior doesn't litter
 
yonkyunior's Avatar
 
Posts: 94
Karma: 216
Join Date: Feb 2015
Device: PRST2
the metadata changes in calibre was not final until we "save to disk", or convert the file, and any action to send file to another device.
and if calibre database corrupt, then calibre search the opf file first (not sure), then restore the db, since the opf in folder was update than opf inside the epub.

if you open epub file (extract),or open with epub editor, you will see built-in opf file,
you can compare the opf file if you want.
yonkyunior is offline   Reply With Quote
Old 03-02-2020, 05:57 AM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,683
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@stan999 - yonkunior has the nub of it, here's the unabridged version.

The metadata.opf files in book folders are there to facilitate rebuilding (restoring) of the library database if it gets corrupted somehow (metadata.db in library folder). I've been using calibre for nearly a decade and I never had to rebuild a database.

The metadata.opf file in book folders and the .opf files in epubs have similarities but they are not interchangeable and never will be.

IMO, unless you intend round-tripping Saved to disk formats back into a calibre library there is little point in saving the metadata.opf and/or the cover.jpg files with the saved format files. An exception might be if the format you're saving has no (or limited) embedded metadata - e.g. a MOBI or a CBZ.

The cover.jpgs are where calibre gets the images to display in Book details, Cover carousel and grid, Conversion dialogue, etc. Extracting images from format files or the database would make calibre appreciably slower.

BR

Last edited by BetterRed; 03-02-2020 at 08:48 AM.
BetterRed is offline   Reply With Quote
Old 03-02-2020, 05:57 AM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,654
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by stan999 View Post
I don't see any use for them whatsoever. I changed settings to ignore cover and .opf files. I'm convinced these are implemented for a reason, which one would that be?
The reason the cover and the OPF files are there is in case the database gets corrupted. You can restore the database because Calibre gets the information from the OPF files and the cover from the cover files. So if you don't have these files and you need to restore your database, you are not going to be able to and you will have to start over.

So allow Calibre to create the cover and OPF files and be safe. I'm not sure if this will work, but give it a try. Allow Calibre to create the cover and OPF files. Create a new database based on your existing database and copy everything from the existing database to the new database. That (I would think) would create the covers and OPF. If that works and the new database is OK, delete the directory and all the subdirectories in the old database directory.
JSWolf is offline   Reply With Quote
Old 03-02-2020, 06:13 AM   #5
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,683
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@JSWolf - AFAIK, the covers are not stored within the database - your post seems to be implying they are.

In your second paragraph you refer to something called a 'database' in several places , I presume you mean 'library' - if so why not say so, afaik its not a banned word

BR
BetterRed is offline   Reply With Quote
Old 03-02-2020, 06:24 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,654
Karma: 130140792
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by BetterRed View Post
@JSWolf - AFAIK, the covers are not stored within the database - your post seems to be implying they are.

In your second paragraph you refer to something called a 'database' in several places , I presume you mean 'library' - if so why not say so, afaik its not a banned word

BR
It is both a library and a database (with external files). But in saying database, I'm meaning the database that can get corrupted and then need to be rebuilt.

As for the cover, yes, I did say that incorrectly.
JSWolf is offline   Reply With Quote
Old 03-02-2020, 06:32 AM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,683
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
So what tools do you recommend to create new databases, and copy the contents of old databases to new databases etc.

An empty calibre library needs a library folder as a place to store an empty database - in which the baseline database schema is stored. If you add a book, even one with no format files, you'll get an author and a book folder with an opf file.

BR

Last edited by BetterRed; 03-02-2020 at 06:36 AM.
BetterRed is offline   Reply With Quote
Old 03-02-2020, 07:21 AM   #8
stan999
Member
stan999 began at the beginning.
 
Posts: 20
Karma: 24
Join Date: Jul 2019
Device: none
Yup, I get it now. I'll keep 'em in there even though I usually do an external backup just about every day. This not storing your library in the cloud is really annoying. And forget the server bs thing. I appreciate the input!
stan999 is offline   Reply With Quote
Old 03-02-2020, 08:55 AM   #9
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,683
Karma: 26966376
Join Date: Mar 2012
Location: Sydney Australia
Device: none
It is not unknown for people to backup a corrupt database, day after day, after day, after day, after day, after day… until one day…. kaboom! It has been common (best) practice to provide a mechanism to rebuild complex databases from simple raw data since forever

BR
BetterRed is offline   Reply With Quote
Old 03-02-2020, 09:14 AM   #10
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,982
Karma: 56143930
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by stan999 View Post
Yup, I get it now. I'll keep 'em in there even though I usually do an external backup just about every day. This not storing your library in the cloud is really annoying. And forget the server bs thing. I appreciate the input!
You can keep COPIES in the cloud, just not use them while they are there (with safety. Folk do. Sometimes they get away with it. Sometimes KABLOOEY. Google drive is the only one that I know that damages them unless you first zip the lot before clouding them. )

Content server NONSENSE?
It works.
It makes books available in the existing format (no conversion)
Current release even allows metadata adjustments
theducks is offline   Reply With Quote
Reply

Tags
metadata files, opf file


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
French accents and the point while saving myki Library Management 5 04-14-2015 03:16 AM
Deleting folders without OPF vs recreating OPF files wladdy Library Management 8 03-13-2015 05:50 AM
Lost opf files when moving files to a new library theaccountant Library Management 4 02-25-2015 03:11 PM
TWO OPF files or something like Media Queries in the OPF file for KF8 and MOBI? DHahn Kindle Formats 3 04-17-2012 04:06 AM
Losing files when saving saving to disk theaccountant Library Management 4 03-10-2011 02:38 PM


All times are GMT -4. The time now is 08:55 AM.


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