10-23-2019, 08:00 PM | #1 |
Junior Member
Posts: 2
Karma: 10
Join Date: Oct 2019
Device: Kindle
|
Use calibre ebook-convert as a Python Module
Hi,
I'm building a tool that runs on the server and needs to convert ebooks to other formats. The problem is that I can't run the calibre CLI (and use the ebook-convert command) on the server, 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. Thanks! |
10-23-2019, 11:30 PM | #2 | ||
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
Quote:
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... |
||
10-24-2019, 02:46 PM | #3 | |
Junior Member
Posts: 2
Karma: 10
Join Date: Oct 2019
Device: Kindle
|
Ok,
My mistake, I can run the calibre CLI but I need to upload it to the server. Am I right? In that case, should I upload the whole calibre source or what? It would be awesome if you give me some steps on how to do it. Quote:
|
|
Tags |
ebook-convert, module, python, server |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre - Python No module named magick | BigBird | Calibre | 7 | 10-02-2016 06:01 PM |
Import module not in bundled Python | Toxaris | Plugins | 11 | 02-01-2016 02:55 AM |
python error: No module named MySQLdb | stgabriel | Development | 1 | 03-10-2013 03:13 PM |
Python error using ebook-convert (Linux) | p014k | Library Management | 4 | 09-10-2012 11:24 PM |
Python 3 - Safe to use/convert to? | ahi | Workshop | 10 | 09-18-2009 02:56 PM |