Calibre
Calibre is a powerful, user-friendly and completely free open source software for managing e-books on Windows, macOS and Linux. It is written in and extensible using Python.
Adding a book programmatically
Section titled “Adding a book programmatically”- Save as a file:
import calibre.ebooks.metadata.metaimport calibre.librarydb = calibre.library.db('/path/to/library').new_apipath = "/path/to/book.epub"md = calibre.ebooks.metadata.meta.get_metadata(open(path, "rb"),stream_type="epub",)db.add_books([(md,{"EPUB": path,})])
2. Run the file using `calibre-debug`: ```shell calibre-debug something.py ```