View Single Post
Old 04-13-2024, 08:02 PM   #4
thiago.eec
Guru
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 946
Karma: 1183425
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite
Quote:
Originally Posted by KissMeKiwi View Post
What I am curious, is there an API or module to interact with calibre through python? Really I would need to look for a book, grab an epub (convert if it doesn't exist), and send it via an email. I saw some other links but it seemed like that was creating an entire environments for it and it got me confused.
API documentation for the database interface: https://manual.calibre-ebook.com/en/db_api.html

API documentation for the e-book editing tools: https://manual.calibre-ebook.com/en/polish.html

You can use the API in your python scripts. To execute the script, you use this command:
calibre-debug /path/to/your/python/script.py

Quote:
Originally Posted by KissMeKiwi View Post
Okay so in theory, I can just run shell commands on the same machine which really should be doable in python.
Command Line Interface: https://manual.calibre-ebook.com/en/...cli-index.html
Yes, using the Command Line Interface.

Last edited by thiago.eec; 04-13-2024 at 08:07 PM.
thiago.eec is offline   Reply With Quote