Code Monkey home page Code Monkey logo

darkthumbs's Introduction

V1.7 is released!

Read the details and download the installer from the releases page. Also see the releases page for additional changes in earlier releases.

Status

Due to a family crisis, the latter half of 2022 was a complete loss for working on projects.

With the New Year 2023, I hope to move forward again on this and other projects. I hope for your understanding and patience.

DarkThumbs

Thumbnail preview support for ebooks and various archive formats in Windows File Explorer.

Minimum system requirements

Windows 7/8/8.1/10 (32/64-bit)

Visual C++ Redistributable

Screenshot

(See the V1.7 release for a view of the current manager UI) V1.5

Supported formats

  • EPUB
  • FB2
  • Kindle (MOBI, AZW, AZW3)
  • CBZ
  • CBR
  • RAR
  • ZIP

With a Little Help From ...

logo2 - Deleaker : the best tool for finding memory, GDI and other leaks!

Credits

Source Code

Used Invertex's CBXShell as a base

MOBI support thanks to libmobi

Application Icon

Icons made by Those Icons from Flaticon

darkthumbs's People

Contributors

dark-knight404 avatar fire-eggs avatar github-account1111 avatar ionum avatar l0garithmic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

darkthumbs's Issues

To investigate: other escaped characters in coverfile

The following code:

coverfile = rootpath + itemTag.substr(posStart, posEnd - posStart);
ReplaceStringInPlace(coverfile, "%20", " ");

is intended to deal with escaped spaces in the cover image filename. What other characters are legal in filenames which need to be escaped for XML?

Not the right cover for some epub

Hello, thanks to the last 1.1 fix with epub, I can view the result without crash :)

I see some epub didn't have the right cover, in comparison Calibre / SumatraPDF choose the right one.

Case 1

I see the content.opf file for these epub with bad cover picked by DarkThumb don't have any cover information.
After picking the right image with Calibre Editor, following lines are added in the content.opf file and it's ok for DarkThumbs :

<?xml version='1.0' encoding='utf-8'?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="uuid_id" version="2.0">
  <metadata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:calibre="http://calibre.kovidgoyal.net/2009/metadata" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:publisher>...</dc:publisher>
    <dc:language>en</dc:language>
    <dc:creator opf:file-as="Неизв." opf:role="aut">xxx</dc:creator>
    <meta name="calibre:timestamp" content="2021-03-03T20:51:55.968000+00:00"/>
    <dc:title>xxxxx</dc:title>
    <dc:date>2021-03-02T21:00:00+00:00</dc:date>
    <dc:contributor opf:role="bkp">calibre (1.5.0) [http://calibre-ebook.com]</dc:contributor>
    <dc:identifier id="uuid_id" opf:scheme="uuid">49953084-6f87-4f00-8763-7cffe4159ad5</dc:identifier>

	<!-- Added after marking the right image with calibre editor as cover -->
    <meta name="cover" content="cover-image"/>
	<!-- Added after marking the right image with calibre editor as cover -->

  </metadata>
  <manifest>
    <item href="EPUB/images/9781284157468_APP_TAB02-01.png" id="itabap-2-1" media-type="image/png"/>
    <!-- ... -->
    <item href="EPUB/images/9781284157468_EQU26-1.png" id="i9781284157468_EQU26-1" media-type="image/png"/>
    <item href="EPUB/images/9781284157468_FC.jpg" id="cover-image" media-type="image/jpeg"/>
    <!-- ... -->
    <item href="EPUB/images/pub.jpg" id="iJBLRN_LOGO_Colo1cK" media-type="image/jpeg"/>
    <item href="EPUB/xhtml/01_Titlepage.xhtml" id="i01_Titlepage" media-type="application/xhtml+xml"/>
    <!-- ... -->
    <item href="EPUB/xhtml/12_Chapter01_01.xhtml" id="i12_Chapter01_01" media-type="application/xhtml+xml"/>
    <!-- ... -->
    <item href="EPUB/xhtml/46_Index_split_001.xhtml" id="i46_Index9" media-type="application/xhtml+xml"/>
	<!-- ... -->
    <item href="EPUB/xhtml/cover.xhtml" id="icover" media-type="application/xhtml+xml"/>
    <item href="page_styles.css" id="page_css" media-type="text/css"/>
    <item href="stylesheet.css" id="css" media-type="text/css"/>
    <item href="toc.ncx" id="ncx" media-type="application/x-dtbncx+xml"/>
  </manifest>
  <spine toc="ncx">
    <itemref idref="icover"/>
    <itemref idref="i01_Titlepage"/>
    <itemref idref="i12_Chapter01_02"/>
	<!-- ... -->
    <itemref idref="i46_Index1"/>
  </spine>
  <guide>

	<!-- Added after marking the right image with calibre editor as cover -->
    <reference type="cover" href="EPUB/images/9781284157468_FC.jpg"/>
	<!-- Added after marking the right image with calibre editor as cover -->
  </guide>

</package>

I noticed these epub have this kind of structure : ./EPUB/xhtml/cover.xhtml
content of cover.xhtml :

<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:ns="http://www.w3.org/2001/10/synthesis" lang="en-us" xml:lang="en-us">
	<head>
		<title>xxxxx</title>
		<link href="../css/theme/night.css" rel="alternate stylesheet" title="night" type="text/css"/>
		<link href="../css/theme/sepia.css" rel="alternate stylesheet" title="sepia" type="text/css"/>
		<meta content="urn:uuid:4df3029a-89df-4306-89d2-a9be503b6aa4" name="Adept.expected.resource"/>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
		<link href="../../page_styles.css" rel="stylesheet" type="text/css"/>
	</head>
	<body aria-label="cover" epub:type="cover" class="calibre">
		<div class="calibre1">
			<img alt="" src="../images/9781284157468_FC.jpg" class="calibre2"/>
		</div>
	</body>
</html>

I don't know if it's a kind of epub standard that is legit to target the cover page and so the cover image or not.

Case 2

I have another case where the first image have been picked as cover (fallback rule I guess) despite its root opf file :

Mich_9780307790361_epub_opf_r1.opf :

<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="PrimaryID" version="2.0">
	<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
		<dc:title>...</dc:title>
		<dc:language>en-US</dc:language>
		<dc:identifier id="PrimaryID" opf:scheme="ISBN">...</dc:identifier>
		<dc:creator opf:file-as="..." opf:role="aut">...</dc:creator>
		<dc:publisher>...</dc:publisher>
		<dc:date opf:event="publication">2011-03-16</dc:date>
		<dc:rights>...</dc:rights>
		<meta content="cover-image" name="cover"/>
	<meta content="1.2" name="epubcheckversion"/>
	<meta content="2012-02-02" name="epubcheckdate"/>
	<description xmlns="http://purl.org/dc/elements/1.1/">...</description>
</metadata>
	<manifest>
		<item href="Mich_9780307790361_epub_ncx_r1.ncx" id="ncx" media-type="application/x-dtbncx+xml"/>
		<item href="OEBPS/Mich_9780307790361_epub_cvi_r1.htm" id="cvi" media-type="application/xhtml+xml"/>
				<!-- ... -->
		<item href="OEBPS/Mich_9780307790361_epub_css_r1.css" id="css" media-type="text/css"/>
		<item href="OEBPS/images/Mich_9780307790361_epub_001_r1.jpg" id="f001" media-type="image/jpeg"/>
		<!-- ... -->
		<item href="OEBPS/images/Mich_9780307790361_epub_103_r1.jpg" id="f103" media-type="image/jpeg"/>
		<item href="OEBPS/images/Mich_9780307790361_epub_cvt_r1.jpg" id="fcvi" media-type="image/jpeg"/>
		<item href="OEBPS/images/Mich_9780307790361_epub_L02_r1.jpg" id="fL02" media-type="image/jpeg"/>
		<item href="OEBPS/images/Mich_9780307790361_epub_L03_r1.jpg" id="fL03" media-type="image/jpeg"/>
		<item href="OEBPS/images/Mich_9780307790361_epub_tp_r1.jpg" id="ftp" media-type="image/jpeg"/>
		<item href="OEBPS/page-template.xpgt" id="page" media-type="application/vnd.adobe-page-template+xml"/>
		<item href="OEBPS/fonts/CharisSILB.ttf" id="font1" media-type="application/x-font-ttf"/>
	</manifest>
	<spine toc="ncx">
		<itemref idref="cvi" linear="yes"/>
		<!-- ... -->
	</spine>
	<guide>
		<reference href="OEBPS/Mich_9780307790361_epub_c01_r1.htm" title="Start" type="start"/>
		<reference href="OEBPS/Mich_9780307790361_epub_cvi_r1.htm" title="cover" type="cover"/>
		<reference href="OEBPS/images/Mich_9780307790361_epub_cvt_r1.jpg" title="thumbimagestandard" type="thumbimagestandard"/>
		<reference href="OEBPS/Mich_9780307790361_epub_cop_r1.htm" title="Copyright" type="copyright-page"/>
		<reference href="OEBPS/Mich_9780307790361_epub_toc_r1.htm" title="Table of Contents" type="toc"/>
	</guide>
</package>

Content of OEBPS/Mich_9780307790361_epub_cvi_r1.htm :

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ops="http://www.idpf.org/2007/ops" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<head>
		<title>xxx</title>
		<link href="Mich_9780307790361_epub_css_r1.css" rel="stylesheet" type="text/css"/>
		<meta content="application/xhtml+xml; charset=utf-8" http-equiv="Content-Type"/>
		<meta content="urn:uuid:6da38ed9-7c6a-45a7-982b-f093c8d71f91" name="Adept.expected.resource"/>
	</head>
	<body style="margin-top: 0px; margin-left: 0px; margin-right: 0px; margin-bottom: 0px; text-align: center;">
		<div class="cover">
			<img alt="" src="images/Mich_9780307790361_epub_cvt_r1.jpg"/>
		</div>
	</body>
</html>

=> cover image seems accessible through opf -> cover html file.

What is may be wrong for DarkThumbs / epub standard, at epub root, the opf file is not content.opf but has a specific name :
Mich_9780307790361_epub_opf_r1.opf, and the ncx file too : Mich_9780307790361_epub_ncx_r1.ncx
Concatenation of {partial author name}_{isbn}_epub_opf_r1.opf

META-INF/container.xml is correctly targeting it :

<?xml version="1.0" encoding="UTF-8"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
   <rootfiles>
      <rootfile full-path="Mich_9780307790361_epub_opf_r1.opf" media-type="application/oebps-package+xml"/>
   </rootfiles>
</container>

so container.xml => opf file => html for the cover => image for the cover with the "cover" class looks the path to follow to get the right cover image

Not working

I've checked every checkbox in the manager but still don't see any thumbnails:
image

Installer doesn't install to specified folder

lol didn't realize the exe and install folder are still set as \CBXShell\CBXManager.exe lol.
No wonder I could not find DarkThumbs lol.

A bug in the installer.

Here's what the installer shows:
image

And here is where it is installed:

image

Fetching cover from xhtml file

Some epub covers cannot be fetched via metadata: the image is referenced indirectly in an xhtml file.

Known examples:

  1. The Gilbert Morris book from issue 17
  2. "Kotlin_Prog" in my library

A few issues with version 1.5

Hi,

I'm an old user of DarkThumbs, but after I formatted my laptop in late 2021, I never installed it back. I've recently been notified of version 1.5 and I wanted to give it a try. However, I've noticed a few issues:

  1. My main concern is that no thumbs are generated. I've checked EPUB, MOBI, CBR and CBZ files.
  2. No link for the programme was created on the Start Menu, which prevented me from running DarkThumbs.
  3. Before I noticed the link on the desktop, I manually accessed the folder, where I was expecting to find a file called "darkthumbs.exe", but I instead found "CBXManager.exe". This might be intended, but I mention it just in case.
  4. I can see no longer the feature "Show archive indicator". Is it shown by default now? I find it very useful to make a distinction between just an image file and the cover of a comic or a book.

Edit: my laptop runs Windows 11 21H2.

Thanks for your time and I hope this feedback is useful to you.

Install new version is blocked when another version is already installed

When there is a already an installed version and launching the setup, a popup complains about that and indicates to manually uninstall first before installing the new version:
Another version of this product is already installed

It work's but it add some manual steps, generally other apps don't bother the user in similar scenario by uninstalling automatically first or managing some patch / diff / clean before installing latest version.

Similar popup as described here :
https://answers.microsoft.com/en-us/windows/forum/all/another-version-of-this-product-is-already/97538976-1f2a-409f-9854-d0e7994b9dc4?auth=1

Nested archive support

Nested archives (e.g. a ZIP containing an EPUB) are not supported. Something to consider?

[As observed in issue #44]

.fb2 support request

I have some books in Fiction Book 2 format. All of them have covers. There is no working handler for Windows 10. It would be great if you add one in program.

Uninstaller does NOT remove registry keys

Uninstalling DarkThumbs does not remove any of the added registry keys.

The only removal is to delete the DLLs etc, which means the Explorer keeps looking for (and not finding) DarkThumbs.

This also means that turning OFF support for a given file extension doesn't even happen via uninstall (as suggested in #25).

Error while installing

Hello there!

Just had this problem on fresh install of Windows.

image

If I click on "continue", DT is installed and I can open it, but whatever I choose, ePub thumbs aren't shown.

image

I have tried to manually register CBXShell.dll, but that didn't help.

Funny thing is that everything worked great yesterday on old OS installation, which is same as current one:
Windows 10 Education
Version 21H1
OS build 19043.1237
Windows Feature Experience Pack 120.2212.3530.0

Not sure if this is important, but I always create fresh Win ISO with all updates trough uupdump.net

Explorer become unstable

Hi
I'm using your software since 3 weeks (Win7/64). It works well (thanks for that) but everytime I browse folders containing epub file (the only file format I've checked in CBX shell manager), the Windows Explorer freeze after few minutes. The explorer never froze before the installation and stay stable when I don't go in those folders.
Thanks to check that problem.

To investigate: update unzip.cpp, zlib

Note: this issue is likely to be moot until such time as decoding an EPUB / ZIP fails due to bugs fixed in newer code.

"unzip.cpp" is (currently) nine years old (2012)

It is based on zlib V1.1.3 which is (currently) 23 years old (1998).

May wish to upgrade zlib at least to V1.2.11 (2017).

I don't think there are any "official" updates to "unzip.cpp", but I've found one set of changes here. Some of Vladimir's changes are similar to the optimizations I've made for DarkThumbs, but not all.

CBR/CBZ performance

The creation of thumbnails for CBR/CBZ files takes a little bit: around one second.

[For me, with a large CBR/CBZ across the network, it can take 5 seconds]

With the sort option ON, the CBR/CBZ logic scans the entire archive to determine the first image alphabetically.

This can be optimized for ZIP [speed up the scan cycle]. Not sure about CBR [unrar isn't very smart].

Keeps crashing my Windows Explorer

I have a folder with nested folders with hundreds of epubs in it. My windows explorer became unusable and kept crashing all the time. Uninstalling Dark Thumbs resolved the crashing but I miss having the thumbnails. Is anyone else seeing stability issues? Any recommendations?

.7z/.cb7 support please

i have a lot of comics in cb7 format (because of better compression). i hope you will make a support for 7z/cb7 extension

Enable other MOBI formats

libmobi includes support for AZW, AZW3 files. So covers for said files will appear as soon as those file extensions are added to the code.

EPUB3 support

Copied over from issue #15

After doing that, I've noticed that no covers are displayed for EPUB3 files, but I think that this format isn't fully supported yet. You can't probably read an AZW3 file in an ebook reader, and as for Calibre, which supports any format, it's able to read the ebook, but it doesn't provide the cover either. Therefore, there must be something tricky about covers in EPUB3.

Just in case, I've created a ZIP file containing EPUB3 ebooks from Standard Ebooks (https://standardebooks.org/):

https://drive.google.com/file/d/1Lvfj9IQLMzXvTqnch1FpbZNLskuXskma/view?usp=sharing

Again, there must be something peculiar about this format, as it's hard to find support for it, so don't bother too much. Thanks!

CBXManager Help non-functional : remove it

The Help function in CBXManager doesn't work. Mainly because the .CHM file from the original T800 version isn't included.

And the help file is now going to be significantly out of date.

Remove the help function.

Resetting thumbnails

Hello!

I've recently discovered DarkThumbs, which is a great application that covers a need I had.

I'm writing because I've just noticed that the programme wasn't displaying the first page of my CBR files, which contains the cover of the comic. Instead it was displaying a particular page of the comic, which wasn't very useful.

I remembered that there were some settings to tweak and I decided to turn on "Sort images alphabetically". I'm still not sure what it does, but it worked!

The only problem is that the CBR files previously processed still display the wrong thumbnails, so I was wondering if there's a way to reset them, hopefully without resetting all the thumbnails of the rest of my documents. I presume the thumbnails displayed by the programme are stored in a particular folder, but I don't know the details.

Thanks for the programme and keep up the good work!

File Explorer 'Extract' support?

As observed in issue #44, File Explorer's "Extract" view doesn't seem to communicate with DarkThumbs. E.g. if I have a ZIP containing an EPUB, and the ZIP is viewed in File Explorer via "extract", no thumbnail is seen.

Different interface? Works with DarkThumbs V2?

FB2 support enabled only together with MOBI

First of all, thank you very much for your program. Unfortunately, when I tick "FB2" and then click apply tick on FB2 disappears. No such problem with EPUB for example.
System: Windows 10 20H2 x64.

Versioning / about

  • can't get to the about box
  • app properties / about versioning don't match my releases

Some covers not showing

FINALLY got a chance to try the new version. I know, I suck. I'm sorry... I moved twice since you released 1.1 lol..

DarkThumbs works freaking fantastically now. It is SO cool to see all my eBooks show up with covers. I have ZERO complaints. Just wanted to throw some books with no covers showing so you could troubleshoot why the current version does not see them.

Really not a big deal. Just thought if you wanted to look into it, I think it would be a pretty easy fix. All but 1 have the covers in the same folder.

https://www18.zippyshare.com/v/fXLy6u0U/file.html

Proper detection of some epub cover

It's nice to see there is improvement of epub support since original T800 CBX Shell :)
https://github.com/T800G/CBXShell/search?q=container.xml&unscoped_q=container.xml
https://github.com/dark-knight404/DarkThumbs/search?q=container.xml&unscoped_q=container.xml

Before :
image

After :
image

Some epub have still issue to get the right cover and use the same strategy as original CBX Shell (as fallback I guess) and get the first image available :
image

It's weird because container.xml and content.opf are ok :
META-INF/container.xml

<?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
	<rootfiles>
		<rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>
	</rootfiles>
</container>

OEBPS/content.opf

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" version="2.0">
	<metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf">
		<dc:title>Kotlin for Enterprise Applications using Java EE</dc:title>
		<!-- ... -->
		<meta name="cover" content="Images/24c9fdee-a166-474a-9c44-84df76f0e730.png"/>
	</metadata>
</package>

Images/24c9fdee-a166-474a-9c44-84df76f0e730.png is available and is the right cover :
image

More intelligent determination of files to represent comic archives

Problem:
The default behaviour mostly works fine, but depending on the contents of your comic archive, it can contain files that are credits, notes, or related to recruitment (of the scanlation team). Sometimes they'll even have a file that is explicitly meant to be the cover. Regardless of whether you activate sorting alphabetically, the first file isn't always the best file for the cover.

Proposed Enhancement:
Assuming it isn't going to be much of a performance hit, it would be nice if the logic for determining the 'cover' for an archive was something like the following:

  • Prefer the first file containing 'cover' in the name (case insensitive)
  • Ignore files containing the following in their name: 'credit', 'recruitment', 'note' (case insensitive)

Presumably you'd want an option for whether to activate this behaviour.

File explorer doesn't respond after displaying thumbnails

Hi,

I've been waiting to be sure about it, but I've just noticed, once again, that a few seconds after the creation of thumbnails, file explorer doesn't respond, which means that I can't open another instance or even do something in the current instance.

I need to further investigate it, but it's happened to me while dealing with CBR and CBZ files, as I was trying to determine how long it takes for DarkThumbs to show a thumbnail from these types of tiles for the first time.

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.