Skip to content
Script to extract the cover of an epub book and create a thumbnail for it
Python
Branch: master
Clone or download
xtrymind and marianosimone fix check 'Ebook thumbnailer' on python3
on python 3, mmap.find need bytes-like object, not str. this will give
error:
  File "install.py", line 101, in add_thumbnailer_to_tumbler
    if config_content.find('# Ebook thumbnailer') == -1:
TypeError: a bytes-like object is required, not 'str

Signed-off-by: Dede Dindin Qudsy <xtrymind@gmail.com>
Latest commit 00b0f14 Jul 9, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Don't take away the ability to get EPUBs from a URL Jul 3, 2019
README.md Mention Alex Chan in the README Jul 3, 2019
install.py fix check 'Ebook thumbnailer' on python3 Jul 9, 2019
screenshot_with.png improve readme May 16, 2014
screenshot_without.png improve readme May 16, 2014

README.md

What?

epub-thumbnailer is a simple script that tries to find a cover into an epub file and creates a thumbnail for it.

Why?

Because I want my file manager (Nautilus, Thunar, Caja, et al.) to display nice thumnails for my epub ebooks, as it does for pdf files or images, to go from this:

screenshot

to this:

screenshot

How to install?

Run the installer!

sudo python install.py install

Basically, it moves the thumbnailer script to /usr/bin and installs the necessary hooks:

  • In gnome2, using a gconf schema (check src/epub-thumbnailer.schemas)
  • In gnome3, using a thumbnailer entry (check src/epub.thumbnailer)

After installation, you might need to restart your file manager and remove cached thumbnails (~/.cache/thumbnails)

Stand-alone

This will look into the epub_file to find its cover, and will save a size px png file as output_file

epub-thumbnailer <epub_file> <output_file> <size>

Acknowledgments

You can’t perform that action at this time.