View Single Post
Old 06-28-2022, 12:40 PM   #1666
enuddleyarbl
Guru
enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.enuddleyarbl ought to be getting tired of karma fortunes by now.
 
enuddleyarbl's Avatar
 
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
I'm experimenting with having the calibre editor convert epub2s to epub3. When I do so and then run Modify ePub on the book, it always seem to find a problem with the cover that doesn't happen with epub2:
Code:
The cover image has an id != "cover". Renaming to work around bug in Nook Color
It fixes the issue by duplicating the cover and giving it a new name (cover.jpeg -> cover_u1.jpeg) and doing the same with the cover page (titlepage.xhtml -> titlepage_u1.xhtml). I've got two trivial questions:

1. Why is "_u1" appended to the file names? Is there a meaning there that I'm just missing?
2. Where is that id (that's not equal to "cover") set? I can't seem to find any kind of id in any of those files.

EDIT 1: Also, once Modify ePub creates that new cover/titlepage, running EPUBCheck against the book gives me the following error:
Code:
The property "svg" should be declared in the OPF file.
and I have to add:
Code:
properties="svg"
to the text/titlepage_u1.xhtml line of content.opf file. With the Semantic cover page set, the whole line looks like:
Code:
}</meta>
  </metadata>
  <manifest>
    <item href="text/titlepage_u1.xhtml" id="titlepage1" media-type="application/xhtml+xml" properties="svg calibre:title-page"/>
EDIT 2: Ooh. And running Modify ePub again removes the "properties" bit from the content.opf entirely. I'll have to turn off whatever's doing that in the plugin.

Just for grins, here's the whole Modify ePub log:
Code:
Modify ePubs version (1, 7, 3)
Logfile for book ID 1239 (The Abolition of Man / CS Lewis)
Job details 1239
  Modifying:  C:\Users\Dave\AppData\Local\Temp\calibre_smt9rh27\hslu2xep_modify_epub\1239.epub
	Updating metadata and cover
	  Parsing xml file: content.opf
	Looking for redundant entries in manifest
	Looking for unmanifested files
	Looking for broken links in the NCX
	  No NCX found
	Looking for Adobe xpgt files and links to remove
	Looking for pagemaps
	Looking for Google Play pagemaps
	Looking for Adobe DRM meta tags to remove
	Looking for legacy jackets
	Adding or updating jacket
	 Current jacket removed:  jacket.xhtml
	  Manifest item removed: jacket.xhtml (calibre_jacket)
	  Spine itemref removed: calibre_jacket
	  Manifest item added: jacket.xhtml (calibre_jacket)
	  Spine item inserted: calibre_jacket at pos: 1
	Looking for html pages containing only broken image links
	Looking for non dc: elements in manifest
	  Removing child: {http://www.idpf.org/2007/opf}meta
	  Removing child: {http://www.idpf.org/2007/opf}meta
	  Removing child: {http://www.idpf.org/2007/opf}meta
	  Removing child: {http://www.idpf.org/2007/opf}meta
	  Removing child: {http://www.idpf.org/2007/opf}meta
	  Removing child: {http://www.idpf.org/2007/opf}meta
	  Removing child: {http://www.idpf.org/2007/opf}meta
	  Removing child: {http://www.idpf.org/2007/opf}meta
	  Removing child: {http://www.idpf.org/2007/opf}meta
	  Removing child: {http://www.idpf.org/2007/opf}meta
	Looking for html files to remove charset meta tags/encode to utf-8
	  Switched to UTF-8 encoding for: nav.xhtml
	  Switched to UTF-8 encoding for: toc.xhtml
	  Switched to UTF-8 encoding for: text/aboutauthor.html
	  Switched to UTF-8 encoding for: text/aboutpublisher.html
	  Switched to UTF-8 encoding for: text/appendix.html
	  Switched to UTF-8 encoding for: text/booksby.html
	  Switched to UTF-8 encoding for: text/copyrightpage.html
	  Switched to UTF-8 encoding for: text/credits.html
	  Switched to UTF-8 encoding for: text/epigraph.html
	  Switched to UTF-8 encoding for: text/notes.html
	  Switched to UTF-8 encoding for: text/part0004_split_001.html
	  Switched to UTF-8 encoding for: text/part0005_split_001.html
	  Switched to UTF-8 encoding for: text/part0006.html
	  Switched to UTF-8 encoding for: text/tauthorpage.html
	  Switched to UTF-8 encoding for: text/titlepage.xhtml
	  Switched to UTF-8 encoding for: text/tpage.html
	Looking for embedded fonts
	Looking for css @font-face style declarations
	Looking for inline @font-face style declarations
	Looking for CSS margins
	Looking for inline javascript blocks to remove
	Looking for .js files to remove
	Applying smarten punctuation
	Stripping Kobo remnants
	  Stripped Kobo spans in: text/booksby.html
	  Stripped Kobo spans in: text/notes.html
	  Stripped Kobo spans in: text/part0004_split_001.html
	  Stripped Kobo spans in: text/part0005_split_001.html
	  Stripped Kobo spans in: text/part0006.html
	Looking for files to remove: ['iTunesMetadata.plist', 'iTunesArtwork']
	Looking for files to remove: ['META-INF/calibre_bookmarks.txt']
	Looking for files to remove: ['.DS_Store', 'thumbs.db']
	Looking for unused images
	Stripping spans
	Unprettying files
	  De-indented: nav.xhtml
	  De-indented: text/titlepage.xhtml
	Insert or replace cover
	...Looking for guide cover reference
	...Looking for meta cover
	...Looking for other.ms-* guide references to clean out
	...Writing new cover image and titlepage html
	  New cover image written to: images/cover_u1.jpeg
	  New titlepage html written to: text/titlepage_u1.xhtml
	...Updating manifest and TOC for the new cover
	  Manifest item added: text/titlepage_u1.xhtml (titlepage1)
	  Manifest item added: images/cover_u1.jpeg (cover1)
	  Meta item inserted: cover:cover1
	  Spine item inserted: titlepage1 at pos: 0
	  No guide parent element found - inserting one
	  Guide item inserted: text/titlepage_u1.xhtml:Cover:cover
	...Remove any orphaned guide images
	...Apply device specific fixes
The cover image has an id != "cover". Renaming to work around bug in Nook Color
	...Cover modifications completed
ePub updated in 0.36 seconds

Last edited by enuddleyarbl; 06-28-2022 at 01:11 PM.
enuddleyarbl is offline   Reply With Quote