Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Book-Cover with Kindlegen sending the Book via E-Mail #411

Closed
TheLux83 opened this issue Dec 12, 2017 · 25 comments
Closed

No Book-Cover with Kindlegen sending the Book via E-Mail #411

TheLux83 opened this issue Dec 12, 2017 · 25 comments

Comments

@TheLux83
Copy link

Hey there,
I'm using the calibre-web Docker image from technosoft2000 but I think this is no error with the image.
When I'm sending a Book to my kindle via Calibre-Web, everything is going well.
It send the book and my kindle downloads the book. No problem with that. But unfortunately, it doesn't download or shows me the book cover. When I transfer the eBook via Calibre directly, it shows me the cover.

Is this a normal behavior? If not, do you need anything else to investigate my problem?
As I said, I'm running an Container via Docker.
Here are the versions how they are displayed at the about page:

Program library Installed Version
Python 2.7.13 (default, Apr 20 2017, 12:13:37) [GCC 6.3.0]
Kindlegen Amazon kindlegen(Linux) V2.9 build 1028-0897292
ImageMagick ImageMagick 6.9.9-21 Q16 x86_64 2017-11-04 http://www.imagemagick.org
PyPDF2 v1.26.0
Babel v2.5.1
SqlAlchemy v1.1.15
Flask v0.12.2
Flask Login v0.4.0
Flask Principal v0.4.0
Tornado web server v4.5.2
ISO639 Languages v0.4.5
Requests v2.18.4
SQlite v3.20.1
Pysqlite v2.6.0
@adocampo
Copy link
Contributor

Hi,
I'm facing the very same issue with the same docker container. If developers doesn't see this behaviour normal, I think it could be the container's fault.
Besides this, all the other features seems to work as expected, I just noticed that converted epubs to mobi are almost x4 larger than the epub size and even larger than the same epub converted to mobi through calibre.... but I do not know if this is related to kindlegen.

@varunpatro
Copy link

Having the same issue here too. @janeczku can you provide any help here? I can help to submit a patch if you can point me in the right direction.

My guess for this is that its something about the metadata image url, but I'm only speculating here.

@Kyosfonica
Copy link
Contributor

I use that container and do not experience the issue. Which kindle are you using? I have kindle keyboard and kindle app. Keyboard doesn't display covers but the app does after the book is downloaded.

@adocampo
Copy link
Contributor

Kindle Voyage 2016.

@Kyosfonica
Copy link
Contributor

Just received my Kindle Paperwhite.

I was able to reproduce the issue so I will take a look into it.

@Kyosfonica
Copy link
Contributor

I checked the flow and what kindlegen does.
Unfortunately this is not an issue of calibre-web. The problem is with kindlegen that is unable to convert the epub cover into kindle mobi compatible. Kindlegen is Amazon.com property, it is free to use but it isn't open source.

I checked kindlegen alone and the same issue appears. The book is correctly converted and readable but you get this error message during conversion:
Info(prcgen):I1052: Kindle support cover images but does not support cover HTML. Hence using the cover image specified and suppressing cover HTML in content.

The quickest solution is to use another conversor and add the mobi files to the library, but it adds a layer of complexity to the simple "Send to Kindle" feature that we all love.

Calibre has its own conversor but it is embedded in the code. A command line tool is provided but it is just an interface to use the conversor alone. The full project is required to make it work.

Maybe someone is willing to add support to another conversor?

@adocampo
Copy link
Contributor

In fact, kindlegen does the job, but if not as effective, in terms of the size of the converted file, as calibre's one. If you take a EPUB and convert it to MOBI with both calibre and kindlegen, besides calibre can embed the book's cover, the total size of the MOBI file is far smaller than the file generated with Kindlegen.
I'm not a developer myself, so I'm not able to develop another conversion engine, but I wonder if it it would be very difficult to use calibre's converter (named ebook-converter) by installing calibre, perhaps we can use it in conjuntion with calibre-web.

@Kyosfonica
Copy link
Contributor

It won't be difficult to add the option to use one or the other as the code just links the executable with the files before sending the book by email.

I can make the changes myself but I have no free time to do it right now.

If any other is willing to do it first, I can guide him. Otherwise I will take care of the changes once I have some free time.

@OzzieIsaacs
Copy link
Collaborator

Thanks a lot for digging into this (unfortunally I don't have a kindle.)

@adocampo
Copy link
Contributor

@Kyosfonica to be fair, I didn't tested by myself ebook-convert from calibre's binaries. I guess that is the tool it uses when converting an ebook, but perhaps it does programmatically and not through this tool. So, please, before you invest time, let me test and make us sure it will work.
On the other hand, I was unable to install calibre inside the technosoft2000 docker container, so I need to dig also on this to add it to the container or fork it to include at least ebook-convert (and all its dependencies).
I'm pretty busy at the moment, and worst of all, I'm a "paper" reader, so I only read ebook ocassionally (when I just finished one and I'm on my way home in the subway) and the only kindle at my reach is the one from my woman, so please be a bit patient, I'll do the tests and report back here

@Kyosfonica
Copy link
Contributor

Kyosfonica commented Mar 28, 2018

Hi @adocampo,

I already tested both conversors. Kindle devices doesn't support html covers on books, although the cover is there for the kindle app (at least on Android) and for Kindle keyboard (that is only displayed on the book settings page, so a bit useless) on next gen kindles with cover support this image is not displayed at all.

On the other hand, calibre converter does the job as expected and the cover is visible on all kindle devices. The drawback of this conversor is that you need the full calibre project. There is a separate executable (ebook-convert) but it is an interface to only use the converter via command line without the need actually open calibre. You cannot take the converter off the project because it is not standalone.

I didn't test yet to run calibre from the docker container though. I do not know if there are dependencies to meet before being able to run the conversor via command line.

@Kyosfonica
Copy link
Contributor

@Technosoft2000 is it possible to run calibre on your calibre-web docker image?
I am having problems with "No such file or directory" when trying to execute it.

Could you guide me to have calibre up and running?

@Technosoft2000
Copy link

Hi @Kyosfonica

I've seen that the user @jim3ma created a fork and added there the calibre support on the docker image - look at https://github.com/jim3ma/docker-calibre-web

Did you tried this fork already?

@Kyosfonica
Copy link
Contributor

Hi @Technosoft2000,

Didn't know about that fork. Thanks for the information, I will take a look at it.

@adocampo
Copy link
Contributor

I'd tried to follow the steps of several alpine calibre-web dockers to install calibre but none of them worked for me. Is that another cointainer from jim3ma working?

@adocampo
Copy link
Contributor

Just build the jim3ma docker image and it works and calibre is installed. ebook-converter is working inside the image :)
I'm trying to modify helper.py, which seems the piece of code in charge of conversions.

@TheLux83
Copy link
Author

Hey there all,
thanks for looking into my problem. It seems, that I was not the only one ^^
Since a few month now, I switched from my kindle paperwhite to my kindle fire tablet. But now I wanted to switch back and remembered this issue.
So, do I have to install jim3ma's Docker Image now? Or is it integrated in @Technosoft2000 Docker Image as well?

@Kyosfonica
Copy link
Contributor

You should use jim3ma's one

@captainepoch
Copy link

If calibre is installed, they provide a command-line tool called ebook-convert. With this tool it is possible to convert from epub to mobi and transfer the file to the kindle. Maybe it is useful instead using the kindlegen tool, which convert the file but is sent as a document, not as a book.

OzzieIsaacs pushed a commit that referenced this issue Jul 18, 2018
Enable calibre's ebook-convert as converter for mobi files (#411, #533)
@OzzieIsaacs
Copy link
Collaborator

Converting books via calibre's ebook-convert is possible now. I consider this as solved.

@adocampo
Copy link
Contributor

Just to be clear, now when you Send to Kindle an EPUB, it uses the ebook-convert tool instead kindlegen? Or is there some setting to check out?

@OzzieIsaacs
Copy link
Collaborator

You have to have calibre installed on your pc. Afterwards you can config calibre-web to use the calibre-converter to convert books (admin-> basic config -> converter)

@adocampo
Copy link
Contributor

Perfect! I'm using the calibreweb docker cointainer with calibre preinstalled, so I only need to fetch the latest version and test it.

Thank you very much!!! :)

@adocampo
Copy link
Contributor

Just hang around to say now, ebook-convert works perfectly and sends the cover to Kindle, besides the size of the MOBI file is quite smaller than the books converted with kindlegen.
Good job!! 👍

@bodybybuddha
Copy link
Contributor

FYI @Technosoft2000's docker image has the ebook-convert feature as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants