Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 11-09-2020, 11:55 AM   #1
jist
Enthusiast
jist began at the beginning.
 
Posts: 40
Karma: 10
Join Date: May 2018
Device: Onyx Note Lite - Win10
Where is metadata for epubs stored?

I did a web- and a forum- search on this, but couldn't find much information on it:

Where is metadata for epubs stored?
On the f.a.q. page I read "Metadata about the books is stored in the file metadata.db"

But each book also is accompanied by an opf file, which also contains what I guess you could call metadata.

And the epub format is also capable of containing metadata. (correct me if I am wrong)

So it looks like there are three locations that can hold metadata about the books.
Is there information or an overview to be found somewhere that explains what is—or can be—stored in the epub file itself (which you won't loose when copying the ebook somewhere), and what is stored in Calibre's metadata.db and the accompanying opf file?
jist is offline   Reply With Quote
Old 11-09-2020, 12:41 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,224
Karma: 165616549
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by jist View Post
Is there information or an overview to be found somewhere that explains what is—or can be—stored in the epub file itself (which you won't loose when copying the ebook somewhere), and what is stored in Calibre's metadata.db and the accompanying opf file?
The database is the master copy, the metadata.opf is a backup copy and can be used when restoring your library. Unless you use Polish, ModifyEpub or a similar tool, the content.opf file internal to the epub is not modified in the library. When you Send to device for Save to disk, the content.opf will be updated to match the metadata in the database.

Hope this is of some help to you.
DNSB is offline   Reply With Quote
Advert
Old 11-09-2020, 01:12 PM   #3
jist
Enthusiast
jist began at the beginning.
 
Posts: 40
Karma: 10
Join Date: May 2018
Device: Onyx Note Lite - Win10
Thanks DNSB.

Some questions though.

I don't understand where you say: "the content.opf file internal to the epub is not modified in the library."

I don't see any 'content.opf' files. Do you mean that they are somehow contained within the epub file and not visible?

If you meant to say 'metadata.opf' instead, I checked, and they do get updated as soon as you make an edit in Calibre.

So, Calibre does not store or read metadata in the epub files themselves.
Hm, I was guessing that was possible and even useful when copying a book to an ereader that can read metadata from an epub.

But then again, I have no clue if or how epubs support metadata.
I am acquainted with how metadata works for mp3 and flac audio files, but I guess it's a completely different ballgame for epubs.
jist is offline   Reply With Quote
Old 11-09-2020, 01:31 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,224
Karma: 165616549
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by jist View Post
Thanks DNSB.

Some questions though.

I don't understand where you say: "the content.opf file internal to the epub is not modified in the library."

I don't see any 'content.opf' files. Do you mean that they are somehow contained within the epub file and not visible?
What I said is what I meant. An epub uses an .opf file for it's metadata. content.opf is commonly used but any filename.opf can be used as the container.xml file contains a pointer to it. Since an epub is a .zip container, you can see the files internal to an epub in several ways. You can open it with a zip utility such as 7Zip and examine the contents or you can use an epub editor such as Sigil or calibre's internal editor to open the epub.

Quote:
Originally Posted by jist View Post
If you meant to say 'metadata.opf' instead, I checked, and they do get updated as soon as you make an edit in Calibre.
As mentioned, the metadata.opf stored with the epub file is a backup copy of the data in the database and can be used when a database is restored.

Quote:
Originally Posted by jist View Post
So, Calibre does not store or read metadata in the epub files themselves.
Hm, I was guessing that was possible and even useful when copying a book to an ereader that can read metadata from an epub.
As mentioned in my previous message, calibre will insert the metadata into an epub as part of a Send to device or Save to disk operation. The copy in the library is not modified, the copy sent to the device or written to disk is.

Quote:
Originally Posted by jist View Post
But then again, I have no clue if or how epubs support metadata.
I am acquainted with how metadata works for mp3 and flac audio files, but I guess it's a completely different ballgame for epubs.
You can find quite a bit of information on the web. Check out Check What’s in an ePUB?: The OPF File for a quick bit of information on the .opf file and it's contents. Then you can move on to Dublin Core metadata, etc.

Last edited by DNSB; 11-09-2020 at 01:35 PM.
DNSB is offline   Reply With Quote
Old 11-09-2020, 01:37 PM   #5
jist
Enthusiast
jist began at the beginning.
 
Posts: 40
Karma: 10
Join Date: May 2018
Device: Onyx Note Lite - Win10
Great, it's becoming clear to me.
Thanks!
jist is offline   Reply With Quote
Advert
Old 11-09-2020, 04:12 PM   #6
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,224
Karma: 165616549
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by jist View Post
Great, it's becoming clear to me.
Thanks!
Hmmm... might be time for a sanity roll.
DNSB is offline   Reply With Quote
Old 11-10-2020, 03:08 AM   #7
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
Quote:
Originally Posted by DNSB View Post
When you Send to device for Save to disk, the content.opf will be updated to match the metadata in the database..
This will only happen if in Preferences - Save books to disk, the option to Update the metadata of the saved copies is checked.
jbacelar is online now   Reply With Quote
Old 11-10-2020, 07:42 AM   #8
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: 78,831
Karma: 143095300
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Metadata for ePubs is stored in the OPF file inside the ePub.
JSWolf is offline   Reply With Quote
Old 11-10-2020, 09:21 AM   #9
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: 30,859
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
STD does also allow you to export a separate copy of the cover or OPF along with the format.
This is in addition to the books structure (some formats may not contain these in an easy to use form)
theducks is offline   Reply With Quote
Old 11-10-2020, 11:36 AM   #10
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: 78,831
Karma: 143095300
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 theducks View Post
STD does also allow you to export a separate copy of the cover or OPF along with the format.
This is in addition to the books structure (some formats may not contain these in an easy to use form)
You do know what an STD is I hope.
JSWolf is offline   Reply With Quote
Old 11-10-2020, 11:49 AM   #11
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,224
Karma: 165616549
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
You do know what an STD is I hope.
Hmmm.... STD is a TLA for standard wall thickness. Not to mention quite a few other meanings.
DNSB is offline   Reply With Quote
Old 11-10-2020, 11:51 AM   #12
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,538
Karma: 74000001
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by DNSB View Post
Not to mention quite a few other meanings.
https://en.wikipedia.org/wiki/STD
ownedbycats is offline   Reply With Quote
Old 11-10-2020, 12:38 PM   #13
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,578
Karma: 14328510
Join Date: Nov 2019
Device: none
Quote:
Originally Posted by ownedbycats View Post
Hmm, "short term disability"; yeah my brain suffers from those all the time. Sometimes also called a senior moment.
hobnail is offline   Reply With Quote
Old 11-16-2020, 07:43 PM   #14
Freakeao
Connoisseur
Freakeao began at the beginning.
 
Posts: 51
Karma: 10
Join Date: Nov 2012
Device: none
Is there a way to find out which EPUBs have content.opf that is out of date (or different) from what is stored in the Calibre database? I'd like to have all my EPUBs with matching metadata compared to calibre, because I use other programs to serve OPDS feeds and sometimes just email someone a EPUB that I have.

Going forward what is the easiest way to keep content.opf updated when I update calibre metadata?

Thanks.
Freakeao is offline   Reply With Quote
Old 11-16-2020, 09:14 PM   #15
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 44,224
Karma: 165616549
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Freakeao View Post
Is there a way to find out which EPUBs have content.opf that is out of date (or different) from what is stored in the Calibre database? I'd like to have all my EPUBs with matching metadata compared to calibre, because I use other programs to serve OPDS feeds and sometimes just email someone a EPUB that I have.

Going forward what is the easiest way to keep content.opf updated when I update calibre metadata?

Thanks.
As part of my import to calibre process, I import to an Intake library where I update the metadata and covers, check the epub structures, and fix any errors. Once that process is finished, I run Modify ePub to add the updated covers and metadata to the files and remove some crud before moving them to my Main library.
DNSB is offline   Reply With Quote
Reply

Tags
epub, location, metadata, stored

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Does Forma become slower in managing its stored library with more ePubs in storage droopy Kobo Reader 2 03-01-2019 09:19 AM
Missing Embedded Metadata in EPUBs daemonblade Calibre 1 06-12-2017 04:19 AM
Notes & Highlights for epubs stored on the sd card einkuser Barnes & Noble NOOK 0 07-19-2014 09:49 PM
Sharing EPubs - Metadata question brihyn Library Management 4 08-18-2011 12:49 PM
Editing metadata stored lists MarkT Calibre 2 10-30-2009 03:17 AM


All times are GMT -4. The time now is 03:06 AM.


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