Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-20-2024, 06:10 PM   #1
Odessa
Enthusiast
Odessa began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jun 2021
Location: France
Device: Kobo Libra H2O
Can someone explain me the concept of embedding metadata ?

...Or point me to a good tutorial, please ? I searched in Calibre help and in the forum here, and found nothing.

What is "embedding metadata" in Calibre ? Why should one want to do it ? Why should one not do it ?

I was ignorant of the concept, until I came across the plugin Polish Books and the tool Embed Metadata. Confusion ensued : isn't the whole point of Calibre to embed metadata ? Doesn't metadata get embedded as soon as you change it in the main window ?

Testing it on a few books, I changed things like the title in the main window, then applied the Edit Book command. Opening the content.opf file, I could see the changes in the title right there. So, isn't that... "embedded" ?
Odessa is offline   Reply With Quote
Old 01-20-2024, 06:33 PM   #2
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 13,364
Karma: 238915017
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
No. Without embedding, the changes are in the calibre database, but not in the file itself. If, for instance, you manually copy/paste the file from your calibre library folder elsewhere, the changes won't be there. Calibre embeds the metadata in the file while sending to device and saving to disk, and you can also do it by using the tools you mentioned.
Sirtel is online now   Reply With Quote
Advert
Old 01-20-2024, 06:38 PM   #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: 21,677
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
The editor has an option to embed it on open, you probably have it checked.

Click image for larger version

Name:	Screenshot 2024-01-21 103513.jpg
Views:	347
Size:	65.7 KB
ID:	205931

I think checked is the default setting.

BR
BetterRed is offline   Reply With Quote
Old 01-20-2024, 07:29 PM   #4
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by Odessa View Post
What is "embedding metadata" in Calibre ?
It is the same concept as embedding tags in music files.

Ever wondered how music players know the details (artist, album, song, album image etc) of which song is playing? That is because of "embedded tags / data" in the song file.

It is the same with epub. The opf file contains these tags which contain metadata describing the ebook.
Karellen is offline   Reply With Quote
Old 01-21-2024, 01:00 AM   #5
Odessa
Enthusiast
Odessa began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jun 2021
Location: France
Device: Kobo Libra H2O
Thank you for your replies. I still don't understand.

Quote:
Originally Posted by BetterRed View Post
The editor has an option to embed it on open, you probably have it checked.

Attachment 205931

I think checked is the default setting.

BR
Yes, I looked up this option in my editor, indeed it's checked, and indeed it's the default. However, what is the meaning of that option ? Please read until the end in order to understand exactly what it is I do not understand.

Quote:
Originally Posted by Sirtel View Post
No. Without embedding, the changes are in the calibre database, but not in the file itself. If, for instance, you manually copy/paste the file from your calibre library folder elsewhere, the changes won't be there. Calibre embeds the metadata in the file while sending to device and saving to disk, and you can also do it by using the tools you mentioned.
There are two things I do not understand :

1.- What is changed and what is not changed when you do not embed.

2.- Why you should, apparently, not embed, since not embedding seems to be the default procedure, judging from the fact there are those two special tools to embed (Polish Books and Embed Metadata).

When should you embed ? When should you not embed ? Why is it important and why do we have the choice ?

Regarding point 1, I have trouble understanding the statement that "without embedding, the changes are in the calibre database, but not in the file itself".

My understanding is that the metadata managed by Calibre is in two different places : the metadata.opf file, which is inside the Calibre database but outside of the .epub file (which is actually an archive), and the content.opf file, which is part of the .epub file containing the actual text of the book.

Is that correct ?

If so, does it mean that, if one does not embed, changing the metadata through the user interface only changes the metadata.opf file, not the content.opf file ? But the content.opf file is changed as well as soon as one sends the book to an e-reader, or save it to disk ?

And does embedding mean that both .opf files are changed without any of those operations taking place, if one uses Polish Book or Embed Metadata ?

If that's the case, why is it that making changes through the user interface, then opening the editor to check, one sees that the changes have, indeed, been applied to the content.opf file ? Is it only the action of opening the editor which applies this change, which would not have happened otherwise ?

If so, should not one refrain from using the editor at all ? If "not embedding" is the normal, recommended course of action, should not one avoid to open the editor, since it "embeds" ?

I have occasionally used the editor to change some metadata, the adjustment of which did not transfer from the Calibre UI to my Kobo. I noticed that when applying the Save command of the editor, the changes I made in the content.opf file were not, in fact, saved. I had to use the Save a Copy command, then reimport the book into Calibre.

How is that explained in the context of embedding / not embedding ? It's so different from what happens when you use a normal editor on the configuration file of a program, for instance.

Which brings me to point 2 : what is the logic ? what is the philosophy ? what is the recommended course of action ?

Thank you for your patience !
Odessa is offline   Reply With Quote
Advert
Old 01-21-2024, 01:40 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,260
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If you dont want running the editor to update the metadata in the file turn it off in the calibre integration section of the editor preferences.
kovidgoyal is offline   Reply With Quote
Old 01-21-2024, 04:44 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: 21,677
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Odessa View Post
@BetterRed - Yes, I looked up this option in my editor, indeed it's checked, and indeed it's the default. However, what is the meaning of that option ?
Quote:
When the file is opened, update the metadata embedded in the book file to the current metadata in the calibre library.
Next time read the tool tip.

Quote:
Originally Posted by Odessa View Post
There are two things I do not understand :

1.- What is changed and what is not changed when you do not embed.

2.- Why you should, apparently, not embed, since not embedding seems to be the default procedure, judging from the fact there are those two special tools to embed (Polish Books and Embed Metadata).

When should you embed ? When should you not embed ? Why is it important and why do we have the choice ?

Regarding point 1, I have trouble understanding the statement that "without embedding, the changes are in the calibre database, but not in the file itself".

My understanding is that the metadata managed by Calibre is in two different places : the metadata.opf file, which is inside the Calibre database but outside of the .epub file (which is actually an archive), and the content.opf file, which is part of the .epub file containing the actual text of the book.

Is that correct ?
Not quite, the library database is an SQLite relational database, it doesn't contain files as such, it contains tables which contain columns, in essence there's a column for each metadata element.

The metadata.opf files in the book folders are used to restore the library database should it get corrupted or misplaced. In the 12 years I've been using calibre I have not needed to restore any of my library databases. Pretend they don't exist.

Quote:
Originally Posted by Odessa View Post
If so, does it mean that, if one does not embed, changing the metadata through the user interface only changes the metadata.opf file, not the content.opf file ? But the content.opf file is changed as well as soon as one sends the book to an e-reader, or save it to disk ?

And does embedding mean that both .opf files are changed without any of those operations taking place, if one uses Polish Book or Embed Metadata ?

If that's the case, why is it that making changes through the user interface, then opening the editor to check, one sees that the changes have, indeed, been applied to the content.opf file ? Is it only the action of opening the editor which applies this change, which would not have happened otherwise ?
You need to rethink all of that… based on what I wrote above.

Quote:
Originally Posted by Odessa View Post
If so, should not one refrain from using the editor at all ? If "not embedding" is the normal, recommended course of action, should not one avoid to open the editor, since it "embeds" ?
Uncheck the box you've been advised to uncheck.

Quote:
Originally Posted by Odessa View Post
I have occasionally used the editor to change some metadata, the adjustment of which did not transfer from the Calibre UI to my Kobo. I noticed that when applying the Save command of the editor, the changes I made in the content.opf file were not, in fact, saved. I had to use the Save a Copy command, then reimport the book into Calibre.
If you change the content.opf file in the editor it only changes that content item in the file you are editing, it does not flow through to the library data base.

Quote:
Originally Posted by Odessa View Post
How is that explained in the context of embedding / not embedding ? It's so different from what happens when you use a normal editor on the configuration file of a program, for instance.
Primarily, calibre is an e-book library manager tool. The book-viewer and book-editor are added extras.

Quote:
Originally Posted by Odessa View Post
Which brings me to point 2 : what is the logic ? what is the philosophy ? what is the recommended course of action ?
Watch the calibre videos.

BR
BetterRed is offline   Reply With Quote
Old 01-21-2024, 05:35 AM   #8
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,837
Karma: 103895653
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Metadata is absolutely superior to navigate with on a ereader or reader app than a file browser:
On a Kobo ereader Calibre can set Author and Title, which as minmum should be in the ebook. It also can have publisher info and a comment/blurb/synopsis. All this can be seen in the ebook on the ereader.

Additionally Calibre can set Series and Subtitle for a Kobo.
An ebook can be in zero, 1 or many Collections.

On the actual Kobo ereader you can browse by Books (Title), Author, Series and Collection.
Sort on Books(Titles) can be by Recent, Date Added, Title, Author, Series, File Size or File Type.
Also you can search for a word or phrase and it checks the metadata of Title, Author, Series, Collection and Subtitle.

This makes file browser based ebook interfaces look stupid. In fact computerised document management systems, video rental, book libraries etc have worked like this for 40 years.
Quoth is offline   Reply With Quote
Old 01-22-2024, 06:13 AM   #9
Odessa
Enthusiast
Odessa began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Jun 2021
Location: France
Device: Kobo Libra H2O
I must say I'm a bit disappointed.

If anyone is able to answer this simple question : in what situations should one choose to embed metadata, and when is it advisable not to do so, I'd be grateful.
Odessa is offline   Reply With Quote
Old 01-22-2024, 06:20 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,260
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Quote:
Originally Posted by Odessa View Post
I must say I'm a bit disappointed.

If anyone is able to answer this simple question : in what situations should one choose to embed metadata, and when is it advisable not to do so, I'd be grateful.
The situations are perfectly encapsulated by calibre's default settings. Leave them alone and be on your merry way. Unless you are doing some edge case, you will be fine.
kovidgoyal is offline   Reply With Quote
Old 01-22-2024, 01:18 PM   #11
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,957
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:
Originally Posted by Odessa View Post
I must say I'm a bit disappointed.

If anyone is able to answer this simple question : in what situations should one choose to embed metadata, and when is it advisable not to do so, I'd be grateful.
I would not expect you to embed your identifying metadata data if you plagiarized the work Calibre does insert custom column data (and posible values) into the OPF, so you might consider what those contain.
This is the Gunning fog entry from count pages plugin:
Spoiler:
<meta name="calibre:user_metadata:#fog" content="{&quot;is_csp&quot;: false, &quot;category_sort&quot;: &quot;value&quot;, &quot;name&quot;: &quot;G Fog&quot;, &quot;rec_index&quot;: 24, &quot;#extra#&quot;: null, &quot;column&quot;: &quot;value&quot;, &quot;label&quot;: &quot;fog&quot;, &quot;link_column&quot;: &quot;value&quot;, &quot;display&quot;: {&quot;number_format&quot;: &quot;{0:.1f}&quot;}, &quot;is_editable&quot;: true, &quot;is_custom&quot;: true, &quot;table&quot;: &quot;custom_column_5&quot;, &quot;is_category&quot;: false, &quot;search_terms&quot;: [&quot;#fog&quot;], &quot;is_multiple2&quot;: {}, &quot;is_multiple&quot;: null, &quot;colnum&quot;: 5, &quot;kind&quot;: &quot;field&quot;, &quot;#value#&quot;: 7.007464127878575, &quot;datatype&quot;: &quot;float&quot;}"/>



Metadata is that old card catalog set of cards, simply in a standard form that devices can read EASILY (most of that already appears on the Copyright and L C registration 'print pages.
theducks is offline   Reply With Quote
Old 01-31-2024, 08:29 PM   #12
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
Quote:
Originally Posted by Odessa View Post
I must say I'm a bit disappointed.

If anyone is able to answer this simple question : in what situations should one choose to embed metadata, and when is it advisable not to do so, I'd be grateful.
Back then, I edit metadata and realized I make mistakes editing it.
Since, I haven't Polish the books, I can restore it simply by make calibre reading the metadata inside the book with "Edit Metadata>Edit Metadata in bulk>Check Set metadata(except cover) from the e-book files>Apply"

That's feature help me, because I haven't made changes inside the ebook files.
yonkyunior is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedding some, but not all, metadata during conversion dewd Conversion 1 02-18-2023 11:18 AM
Embedding metadata to PDF ownedbycats Library Management 2 12-10-2022 09:11 PM
Embedding metadata Rellwood Library Management 4 03-08-2018 10:09 PM
Calibre and metadata embedding paoletto Calibre 2 10-29-2014 09:19 PM


All times are GMT -4. The time now is 09:34 AM.


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