Skip to main content

Tiny library to programmatically generate .epub files

Project description

epub-generator

Small library to generate epub files easily

Usage:

from epubgen import EPUB
import xml.etree.ElementTree as ET

book = EPUB("Test EPUB", "author-test", "en")
first_page = ET.Element("p")
first_page.text = "first-page" + 10000 * "hello "
book.add_page(first_page, toc_title="First chapter")

second_page = ET.Element("p")
second_page.text = "second-page" + 10000 * "good morning ! "
book.add_page(second_page, toc_title="Second chapter")
book.generate_epub("test.epub")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epubgen-0.1.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

epubgen-0.1.0-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page