Description: With KDE Applications 19.04 this plugin will be no more needed because a new official solution will be available. See https://phabricator.kde.org/D18738
--------------------
A KDE thumbnail generator for the ePub file format. It works with KDE Frameworks 5, for KDE 4 just keep using 1.0 stable release.
Once installed go to Configure Dolphin -> General -> Previews and select ePub documents.
If you have some epub files containing a cover, but not supported by the thumbnailer, please tell me, I'll be glad to test them.
Since 0.9 it doesn't require libepub (ebook-tools).
To anyone facing compilation errors - here is a list of all the packages I had to install on 18.04 to get this to work:
sudo apt install extra-cmake-modules libkf5archive-dev libqt5xmlpatterns5-dev kio-dev
@caig:
Thanks a lot for all the work you put into this.
@KDE maintainers:
Seeing how this package has been available for 5 years now, I really hope that someone will finally package it up and ship it in Debian / Ubuntu. It's really amazing how many hooks users have to jump through just to get a simple thumbnailer like this working...
thanks tuve que instalar estas librerias adicionales
libkf5archive-dev
libqt5xmlpatterns5-dev
ya puedo ver las miniaturas de los epub excelente trabajo
Thanks for the terrific job.
Installed following the Installation from source (KF5) instructions on your github page on manjaro 16.06.1 and everything works.
However, on both on linux mint 18 as well as kubuntu 16.04 terminal output is:
--------------------
mint@mint ~/bin/kde-thumbnailer-epub-1.1/build $ cmake -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=`kf5-config --prefix` ..
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:5 (find_package):
Could not find a package configuration file provided by "ECM" (requested
version 1.0.0) with any of the following names:
ECMConfig.cmake
ecm-config.cmake
Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR"
to a directory containing one of the above files. If "ECM" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/home/mint/bin/kde-thumbnailer-epub-1.1/build/CMakeFiles/CMakeOutput.log".
------------
Would much appreciate any suggestions on this as well as the build instructions for the .mobi thumbnailer you mentioned in a previous post.
Thanks again.
Hi, sorry for the late answer, the website didn't send me any notification :/
* Compile issue:
Is the package "extra-cmake-modules" installed?
* Mobi thumbnailer:
Being an official KDE project, don't your distros really offer a dedicated package, something like "kdegraphics-mobipocket"?
Thanks for the reply.
I'm on ubuntu/kubuntu 17.10.
I still cannot get this to compile & install. (Dolphin Version 17.04.3) Can you list all dependencies?
Latest errors:
-- Found KF5KIO: /usr/lib/x86_64-linux-gnu/cmake/KF5KIO/KF5KIOConfig.cmake (found version "5.38.0")
-- Could NOT find KF5Archive (missing: KF5Archive_DIR)
-- Could NOT find KF5Archive: found neither KF5ArchiveConfig.cmake nor kf5archive-config.cmake
CMake Error at /usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find KF5 (missing: Archive) (found version "5.38.0")
Call Stack (most recent call first):
/usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
/usr/share/ECM/find-modules/FindKF5.cmake:110 (find_package_handle_standard_args)
CMakeLists.txt:15 (find_package)
-- Configuring incomplete, errors occurred!
---------------------------
I got this far by googling the errors and installing suggested packages. But I can't get past this one.
Thanks, again
I notice you are building this on openSUSE buildservice. Would it be possible to submit it to KDE:Extra so other openSUSE users can install it more easily?
Hello caig,
thanks for your work.
What can I change, to get a thumb displayed.
I did the one-click install and started dolphin again, but no thumb is displayed (also not for pdf).
>Configure Dolphin -> General -> Previews and select ePub documents.<
I cannot find a field "epub" in any of dolphins menues.
I use:
german
openSuse 12.2; Linux 3.4.11-2.16-desktop x86_64
KDE: 4.8.5 (4.8.5)
dolphin Version 2
in YaST2:
libepub is not there but
libepub0
libepub-devel is not installed
okular works fine with mobi, pdf, djvu and epub
thank you
greetings
micca
Hello,
thank you for reporting the issue :)
If the package is successfully installed, the option should be displayed.
The configuration option is a bit hidden in the Dolphin default interface.
Try to use the button on the right side of the toolbar http://paste.opensuse.org/e097a2b4
It should list the "Configure Dolphin" item to open the configuration
dialog and to find the option (General -> Previews and select ePub documents).
Please tell me again if you have some troubles.
Bye!
----
About the PDF thumbnails issue:
check if you have the "kdegraphics-thumbnailers" package installed and the
configuration option selected in Dolphin.
Well, I hope I've found something relevant.
When id for the cover item in content.opf is exactly "cover", thumbnail is produced. But in many epubs the id is the whole file name, extension included:
<item href="Images/cover.jpeg" id="cover.jpeg" media-type="image/jpeg" />
These ones aren't thumbnailed.
I can see the same covers I saw in the previous version. Nothing more. They have in common they are from epubs generated by Calibre, they use svg to scale covers and they use preserveAspectRatio="none" attribute.
This makes less than 1% of my epubs (none of them produced by me).
Do you mean less of 1% of your epubs show a cover? Very bad result :(
In my case I have a 89% of success, 5% more than 0.1 release.
The plugin in first instance searches for a guide element like this:
<guide>
<reference type="cover" title="Cover" href="Text/Section0001.xhtml"/>
</guide>
(type="cover")
If not, as the 0.1 did, searches for the first html/xml file (usually it contains the cover) and parses the file searching for <img> or <image>.
Your suggestion in the other message make me thinking about another way to retrieve covers I can add. I'll study and try it. One of your not working epubs is available for free somewhere? It can be useful to understand. Thank you :)
I forgot to mention most of my epubs have a peculiarity: cover image is inside a header (the first one). Anyway a couple of extra examples: the second one was ok, now I remove preserveAspectRatio="none" and I can't see cover anymore in Dolphin.
http://uploadmirrors.com/download/0PGVCQKU/FederidoGarciaLorca.LaCasaDeBernardaA1.1_0.epub
http://uploadmirrors.com/download/0I2PA6U4/Novelas_ejemplares_-_Cervantes.epub
http://uploadmirrors.com/download/PANVOXNG/Curzio_Malaparte_-_La_piel.epub
Very interesting...I see them:
http://i.imgur.com/SYirZ.png
They are supported with the first strategy (searching for something like):
<guide>
<reference href="Text/titlepage.xhtml" title="Cover" type="cover"/>
</guide>
Ratings & Comments
47 Comments
To anyone facing compilation errors - here is a list of all the packages I had to install on 18.04 to get this to work: sudo apt install extra-cmake-modules libkf5archive-dev libqt5xmlpatterns5-dev kio-dev @caig: Thanks a lot for all the work you put into this. @KDE maintainers: Seeing how this package has been available for 5 years now, I really hope that someone will finally package it up and ship it in Debian / Ubuntu. It's really amazing how many hooks users have to jump through just to get a simple thumbnailer like this working...
thanks tuve que instalar estas librerias adicionales libkf5archive-dev libqt5xmlpatterns5-dev ya puedo ver las miniaturas de los epub excelente trabajo
Thanks for the terrific job. Installed following the Installation from source (KF5) instructions on your github page on manjaro 16.06.1 and everything works. However, on both on linux mint 18 as well as kubuntu 16.04 terminal output is: -------------------- mint@mint ~/bin/kde-thumbnailer-epub-1.1/build $ cmake -DKDE_INSTALL_USE_QT_SYS_PATHS=ON -DCMAKE_INSTALL_PREFIX=`kf5-config --prefix` .. -- The C compiler identification is GNU 5.4.0 -- The CXX compiler identification is GNU 5.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Error at CMakeLists.txt:5 (find_package): Could not find a package configuration file provided by "ECM" (requested version 1.0.0) with any of the following names: ECMConfig.cmake ecm-config.cmake Add the installation prefix of "ECM" to CMAKE_PREFIX_PATH or set "ECM_DIR" to a directory containing one of the above files. If "ECM" provides a separate development package or SDK, be sure it has been installed. -- Configuring incomplete, errors occurred! See also "/home/mint/bin/kde-thumbnailer-epub-1.1/build/CMakeFiles/CMakeOutput.log". ------------ Would much appreciate any suggestions on this as well as the build instructions for the .mobi thumbnailer you mentioned in a previous post. Thanks again.
Same issue on a fresh on manjaro.
Hi, sorry for the late answer, the website didn't send me any notification :/ * Compile issue: Is the package "extra-cmake-modules" installed? * Mobi thumbnailer: Being an official KDE project, don't your distros really offer a dedicated package, something like "kdegraphics-mobipocket"?
Thanks for the reply. I'm on ubuntu/kubuntu 17.10. I still cannot get this to compile & install. (Dolphin Version 17.04.3) Can you list all dependencies? Latest errors: -- Found KF5KIO: /usr/lib/x86_64-linux-gnu/cmake/KF5KIO/KF5KIOConfig.cmake (found version "5.38.0") -- Could NOT find KF5Archive (missing: KF5Archive_DIR) -- Could NOT find KF5Archive: found neither KF5ArchiveConfig.cmake nor kf5archive-config.cmake CMake Error at /usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find KF5 (missing: Archive) (found version "5.38.0") Call Stack (most recent call first): /usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE) /usr/share/ECM/find-modules/FindKF5.cmake:110 (find_package_handle_standard_args) CMakeLists.txt:15 (find_package) -- Configuring incomplete, errors occurred! --------------------------- I got this far by googling the errors and installing suggested packages. But I can't get past this one. Thanks, again
Hello, what about libkf5archive-dev ? https://packages.ubuntu.com/artful/libdevel/libkf5archive-dev
Thank you for update to plasma5. Would you like to update chm thumbnailer to plasma 5?
Yes, I plan to port the chm thumbnailer too.
Hi, caig. What about a Plasma version now that KDE 4 is unmanteined? I can't live without it! ;-)
Hi, yes, sure. I was waiting for Dolphin official kf5 release (and a bit of free time).
Nice to hear, caig. Thanks for your time.
I notice you are building this on openSUSE buildservice. Would it be possible to submit it to KDE:Extra so other openSUSE users can install it more easily?
Interesting suggestion, I'll investigate about this possibility. Thanks.
Should I be getting preview thumbs for .mobi files?
No, just epub, for mobi files KDE offers a thumbnailer mobipocket: https://projects.kde.org/projects/kde/kdegraphics/kdegraphics-mobipocket/repository/revisions/master/show/thumbnailers Bye!
Thanks! I didn't see that when I was searching earlier. I love your epub thumbnailer. Good job on it!
Hello caig, thanks for your work. What can I change, to get a thumb displayed. I did the one-click install and started dolphin again, but no thumb is displayed (also not for pdf). >Configure Dolphin -> General -> Previews and select ePub documents.< I cannot find a field "epub" in any of dolphins menues. I use: german openSuse 12.2; Linux 3.4.11-2.16-desktop x86_64 KDE: 4.8.5 (4.8.5) dolphin Version 2 in YaST2: libepub is not there but libepub0 libepub-devel is not installed okular works fine with mobi, pdf, djvu and epub thank you greetings micca
Hello, thank you for reporting the issue :) If the package is successfully installed, the option should be displayed. The configuration option is a bit hidden in the Dolphin default interface. Try to use the button on the right side of the toolbar http://paste.opensuse.org/e097a2b4 It should list the "Configure Dolphin" item to open the configuration dialog and to find the option (General -> Previews and select ePub documents). Please tell me again if you have some troubles. Bye! ---- About the PDF thumbnails issue: check if you have the "kdegraphics-thumbnailers" package installed and the configuration option selected in Dolphin.
Well, I hope I've found something relevant. When id for the cover item in content.opf is exactly "cover", thumbnail is produced. But in many epubs the id is the whole file name, extension included: <item href="Images/cover.jpeg" id="cover.jpeg" media-type="image/jpeg" /> These ones aren't thumbnailed.
I can see the same covers I saw in the previous version. Nothing more. They have in common they are from epubs generated by Calibre, they use svg to scale covers and they use preserveAspectRatio="none" attribute. This makes less than 1% of my epubs (none of them produced by me).
Do you mean less of 1% of your epubs show a cover? Very bad result :( In my case I have a 89% of success, 5% more than 0.1 release. The plugin in first instance searches for a guide element like this: <guide> <reference type="cover" title="Cover" href="Text/Section0001.xhtml"/> </guide> (type="cover") If not, as the 0.1 did, searches for the first html/xml file (usually it contains the cover) and parses the file searching for <img> or <image>. Your suggestion in the other message make me thinking about another way to retrieve covers I can add. I'll study and try it. One of your not working epubs is available for free somewhere? It can be useful to understand. Thank you :)
I forgot to mention most of my epubs have a peculiarity: cover image is inside a header (the first one). Anyway a couple of extra examples: the second one was ok, now I remove preserveAspectRatio="none" and I can't see cover anymore in Dolphin. http://uploadmirrors.com/download/0PGVCQKU/FederidoGarciaLorca.LaCasaDeBernardaA1.1_0.epub http://uploadmirrors.com/download/0I2PA6U4/Novelas_ejemplares_-_Cervantes.epub http://uploadmirrors.com/download/PANVOXNG/Curzio_Malaparte_-_La_piel.epub
Very interesting...I see them: http://i.imgur.com/SYirZ.png They are supported with the first strategy (searching for something like): <guide> <reference href="Text/titlepage.xhtml" title="Cover" type="cover"/> </guide>
So, what could it be the problem here?