View Single Post
Old 10-23-2019, 10:30 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by apducer View Post
The problem is that I can't run the calibre CLI (and use the ebook-convert command) on the server
Why not?

Quote:
, so I want to run the ebook conversion of calibre as a python module.
Is there an easy way to do this? Is there any documentation that I may have missed?
Also, I would like to upload to the server the least amount of code of the calibre source.
Why do you need to "upload the least amount of code"?

The biggest thing you'll be uploading isn't even calibre itself, it is Qt5 WebEngine, used in PDF output, and Qt5 Svg used for image transforms in any conversion, which means you need PyQt5 installed.

It's not possible to install only part of calibre, at any rate. And there isn't really much documentation for running the underlying bits yourself, but you could check out the usage of calibre.ebooks.conversion.plumber -> Plumber(). Or simply use the main() function from calibre.ebooks.conversion.cli which is what ebook-convert does...
eschwartz is offline   Reply With Quote