Code Monkey home page Code Monkey logo

Comments (9)

fire-eggs avatar fire-eggs commented on June 9, 2024 2

It turns out both your samples illustrated different problems.

"Agile Testing" should have worked with DarkThumbs 1.0 except for an assumption with how paths inside the archive worked. "Agile Testing" has a slightly different path layout which needed to be handled.

For "Botany", I was able to find the cover image without chasing down the <guide> referenced HTML file. There is an <item> tag in the <manifest> section with an id of "cover-image" which matches the image via the <guide>-HTML.

I intend to still tackle the <guide>-HTML variant because I have one of those in my collection. Which is why I'm leaving this issue open, even though "Agile Testing" and "Botany" should be working with DarkThumbs 1.2.

from darkthumbs.

s-kocher avatar s-kocher commented on June 9, 2024 1

1.2 works well 👍, most ebooks I have are fine now :)
Thanks a lot !

from darkthumbs.

fire-eggs avatar fire-eggs commented on June 9, 2024

Could you provide the original problematic EPUB files? Thanks!

from darkthumbs.

fire-eggs avatar fire-eggs commented on June 9, 2024

Looks like both of these are using the <guide> tag. The <guide> tag is deprecated by the EPUB 3.0 standard but ideally should still be supported.

I'll have to do some further research and see if I can find some samples. Thanks for the report!

from darkthumbs.

fire-eggs avatar fire-eggs commented on June 9, 2024

Found one. It appears to most closely match your "case 2".

Wells,H.G.War and the Future[War and the Future]_epub.zip

I'll also note that some readers fail to read it.

I don't have any instances matching your "case 1" ...

from darkthumbs.

s-kocher avatar s-kocher commented on June 9, 2024

Regarding the <guide> tag, Calibre Editor is using it when you choose any image, then right click and Choose <Selected image name> as cover image and it fix the cover image selected by DarkThumbs so it looks it's already implemented even if it's old epub format.
image

I check if I found other similar cases, the 2 ebooks I found with the case 1 are huge ...

from darkthumbs.

s-kocher avatar s-kocher commented on June 9, 2024

may be this one, not exactly the same but look like similar rule with html / xhtml file with name cover
Agile Testing.epub.zip

container.xml

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE container PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0">
  <rootfiles xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
    <rootfile xmlns="urn:oasis:names:tc:opendocument:xmlns:container" full-path="OEBPS/html/9780321616937.opf" media-type="application/oebps-package+xml"/>
  </rootfiles>
</container>

opf :

<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="p9780321616937" version="2.0">
	<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
		<dc:title>Agile Testing</dc:title>
		<meta content="cover-image" name="cover"/>
	</metadata>
	<manifest>
		<item href="toc.ncx" id="ncxtoc" media-type="application/x-dtbncx+xml"/>
		<item href="bk01-toc.html" id="htmltoc" media-type="application/xhtml+xml"/>
		<item href="cover.html" id="cover" media-type="application/xhtml+xml"/>
		<item href="graphics/9780321616937.jpg" id="cover-image" media-type="image/jpeg"/>
		<item href="graphics/16937.jpg" id="thumbnail" media-type="image/jpeg"/>
	</manifest>
	<spine toc="ncxtoc">
		<itemref idref="cover"/>
		<itemref idref="frontm"/>
	</spine>
	<guide>
		<reference href="bk01-toc.html" title="Table of Contents" type="toc"/>
	</guide>
</package>

cover.html

<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Cover page</title>
		<link href="9780321616937.css" rel="stylesheet" type="text/css"/>
		<meta content="urn:uuid:23ed53c4-16c5-479f-841d-c02ec382c541" name="Adept.expected.resource"/>
	</head>
	<body>
		<div>
			<p class="cover">
				<img alt="cove-image" src="graphics/9780321616937.jpg"/>
			</p>
		</div>
	</body>
</html>

from darkthumbs.

s-kocher avatar s-kocher commented on June 9, 2024

My case 1, with many resources removed to make it lighter (so calibre check will probably complain about broken links...)
Botany - An Introduction to Plant Biology, Seventh Edition (2021) light.epub.zip

from darkthumbs.

fire-eggs avatar fire-eggs commented on June 9, 2024

Much obliged!

from darkthumbs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.