marianosimone / epub-thumbnailer

Script to extract the cover of an epub book and create a thumbnail for it
GNU General Public License v3.0
191 stars 29 forks source link

Support Python 3 #8

Closed bobbitybob closed 8 years ago

bobbitybob commented 8 years ago

Getting !!! Python Imaging Library ... Not found. My understanding is that PIL is dead and that Pillow is the way to go. Still not installing on my system. Persevering because I'm hoping this does a better job than gnome-epub-thumbnailer. Thanks.

marianosimone commented 8 years ago

thanks again for the report! I got my hands on a Python 3 installation to try this out, and I did some changes to first try using Pillow instead of PIL.

Please let me know if this fixes your issue and, if not, run this for me and let me know what happens:

python -c 'from PIL import Image' 
marianosimone commented 8 years ago

Also, if you have any example where both gnome-epub-thumbnailer and this epub-thumbnailer fail to generate a thumbnail, I'd love to take a look at it and try to improve the heuristic

bobbitybob commented 8 years ago

I believe this issue is solved. But now getting a crash and traceback. Maybe I should open a new issue?

Installing epub-thumbnailer to /usr/bin/ ... OK Traceback (most recent call last): File "install.py", line 144, in commands[args.action]() File "install.py", line 92, in install environment = check_desktop_env() File "install.py", line 79, in check_desktop_env return VERSION_GUSSERS.get(desktop_environment, lambda: None)() File "install.py", line 60, in gnome_shell_version major_version = version[1][0] IndexError: list index out of range

Attached a couple of books that don't work with gnome-epub-thumbnailer. Obviously I don't know if your tool would do any better, as I've not tried it yet. Happy to help out with testing. :) epub.zip

marianosimone commented 8 years ago

It seems like that's just a problem with the installation (it's not recognizing which desktop environment you are using). If you could open a new issue with as much information about your Linux installation, that would be awesome (I'll try to find a way to make it installable in it)

As per your epubs, I'm happy to tell you that epub-thumbnailer handles them just fine :D hope to be able to make it installable for you!

marianosimone commented 8 years ago

The libraries being used that were moved/renamed in Python 3 are:

marianosimone commented 8 years ago

@bobbitybob this should be fixed now, and you should be able to run the script for your epubs. This won't set the thumbnails in your file browser, but it's a start on how good (or bad) this script is ;)

Please reopen this issue if you still have troubles with that