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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-22-2024, 02:10 AM   #1
stefan230
Junior Member
stefan230 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2024
Device: Pocketbook Inkpad Color 3 (PB743K3)
What does Calibre do when files are imported?

Good morning,

I have a general question on how calibre works. I am trying to get to the root of a bug.

The general story is the following:
I have an E-book from Thalia (a german retailer for books and E-Books) and when I import the book into calibre it does something to the book. And I am trying to understand why and what it actually does to the book.

When imported my manga gets slighty changed by calibre which in turn leads to displaying problems on my Pocketbook E-Reader (Pocketbook Inkpad Color 3 (PB743K3)) in its PB-Reader software.

The working theory is that the E-Book I got from Thalia is either real EPUB2 or EPUB3. It is listed as an EPUB3 in its file though. I think that while importing calibre sees this and then corrects the file to be "proper" EPUB3. Which in turn makes the PB-Reader break. The Epub3 capabilities of the software are generally bad.

So generally I don't see this as being a bug with calibre but with pocketbooks PB-Reader and its lackluster Epub3 implementation.

I would like to report this bug to pocketbook later. In order to this I would like to understand *what* calibre exactly does to the book and *why* it does that. Is my working theory correct here at all? Is there some sort of Epub-sanitation? Is this something I could turn off?

I know this is not a problem with calibre, but rather the PB-Reader, since the same file works well enough with KOReader (But I still have other problems with that one, which are not related to this query).

I attached two content.opf files to this post. The original one from the E-Book from Thalia and a second one of calibre after importing the E-Book into it. I will also attach a diff screenshot from vscode aswell.

It would be nice if some could chime in and explain what happens here. I could boil my problem down to the first two lines of the content.opf which gets changed. So are these the lines which differentiate the unproper EPUB3 file from the proper one in calibre?
Attached Thumbnails
Click image for larger version

Name:	Bildschirmfoto vom 2024-02-20 21-09-48.png
Views:	64
Size:	617.6 KB
ID:	206519  
Attached Files
File Type: opf Thalia.opf (45.9 KB, 33 views)
File Type: opf Calibre.opf (47.5 KB, 30 views)
stefan230 is offline   Reply With Quote
Old 02-22-2024, 04:17 AM   #2
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: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
importing does not touch files they remain byte for byte identical. Unless you have some third party plugins installed in calibre.
kovidgoyal is offline   Reply With Quote
Advert
Old 02-22-2024, 04:50 AM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Although files aren't changed when importing, sending them to the device does update the metadata (opf). You can turn that off by disabling the "metadata writer" plugin for the format type, probably EPUB, in Preferences / Plugins. Alternatively, use "Save to disk" and copy the book manually to the device, or copy it directly from the folder in the calibre library (use the shortcut O to open the folder for the book).
chaley is offline   Reply With Quote
Old 02-22-2024, 11:07 AM   #4
stefan230
Junior Member
stefan230 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2024
Device: Pocketbook Inkpad Color 3 (PB743K3)
Thank you two for your input!

Quote:
Originally Posted by kovidgoyal View Post
importing does not touch files they remain byte for byte identical. Unless you have some third party plugins installed in calibre.
I was fairly sure it did something, but of course you are the dev you would know :) I looked at it again and the files are indeed identical. It was actually the transfer to the device that changed them. (Interestingly enough not only for the device but also in calibre library itself.

Quote:
Originally Posted by chaley
Although files aren't changed when importing, sending them to the device does update the metadata (opf). You can turn that off by disabling the "metadata writer" plugin for the format type, probably EPUB, in Preferences / Plugins. Alternatively, use "Save to disk" and copy the book manually to the device, or copy it directly from the folder in the calibre library (use the shortcut O to open the folder for the book).
This was the hint I needed. Deactivating all those plugins comes with the expected result. The Epubs are now byte to byte copies. So thats actually very nice. Do I lose any vital functionality by disabling those plugins though? (I guess the metadata would not be in the opf-file and it would stay the way it is even if I change metadata in calibre? Like adding the author and a tag and stuff)
stefan230 is offline   Reply With Quote
Old 02-22-2024, 11:30 AM   #5
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: 73,897
Karma: 128597114
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 chaley View Post
Although files aren't changed when importing, sending them to the device does update the metadata (opf). You can turn that off by disabling the "metadata writer" plugin for the format type, probably EPUB, in Preferences / Plugins. Alternatively, use "Save to disk" and copy the book manually to the device, or copy it directly from the folder in the calibre library (use the shortcut O to open the folder for the book).
Is there going to be any problem disabling the metadata writer?
JSWolf is offline   Reply With Quote
Advert
Old 02-22-2024, 11:39 AM   #6
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,734
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by stefan230 View Post
This was the hint I needed. Deactivating all those plugins comes with the expected result. The Epubs are now byte to byte copies. So thats actually very nice. Do I lose any vital functionality by disabling those plugins though? (I guess the metadata would not be in the opf-file and it would stay the way it is even if I change metadata in calibre? Like adding the author and a tag and stuff)
Quote:
Originally Posted by JSWolf View Post
Is there going to be any problem disabling the metadata writer?
If you disable the metadata writer then calibre cannot update metadata in the book, e.g., changes made in calibre. I know it will affect send to the device, save to disk, downloading via the content server, and polish books. It could affect the editor embedding metadata. It could affect plugins like quality check. And possibly, indeed probably, more.

Personally, I wouldn't do it because it is using a huge hammer to fix a small problem. Instead I would directly copy the file to the device, perhaps using Save to disk with the device's books folder as the target. Save to disk supports turning off updating metadata during the save.
chaley is offline   Reply With Quote
Old 02-22-2024, 11:41 AM   #7
stefan230
Junior Member
stefan230 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2024
Device: Pocketbook Inkpad Color 3 (PB743K3)
Quote:
Originally Posted by JSWolf View Post
Is there going to be any problem disabling the metadata writer?
I did just check for myself real quick. My reader has its own little Library program. Where you can sort and view your collections in different ways. It uses though the metadata from that opf-file to get the metadata. So if you never write that metadata to the eBook stuff like the series of the book a description you added and other stuff will not be displayed on the E-Reader and cannot be used to sort stuff with the filters of said library program.

This might a bigger or lesser problem to you.

Obviously enabling the metadata writer writes the metadata to the book and you can use it to sort the library

I did also generally found koreader to work pretty well with those E-Books as well. So that could a great alternative and circumvents the problem. Since it is indeed a problem PB-Reader being just not as good. If you have a B/W-Reader I would go for that

Last edited by stefan230; 02-22-2024 at 11:44 AM.
stefan230 is offline   Reply With Quote
Reply

Tags
calibre, pb-reader, pocketbook

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
AZW3 files imported into Calibre usable in a Kindle? romad Conversion 4 01-29-2023 06:36 PM
Errors When Opening imported Files Diomedeidae Library Management 4 08-18-2020 06:09 AM
Import log - files not imported jataadroid Library Management 4 01-24-2018 01:03 AM
sorting imported files BartB Editor 7 04-29-2014 03:15 AM
Determining which files were not imported during a bulk import valunthar Library Management 3 06-17-2011 08:51 PM


All times are GMT -4. The time now is 05:43 PM.


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