Skip to main content

epubmangler

Tools to read and modify the metadata of EPUB files.

Documentation to be written. See the minimal example below and others in the example directory.

Requires: Python 3.8

Example usage

from epubmangler import EPub

with EPub('Frankenstein.epub') as book:  # https://gutenberg.org/ebooks/84

    # Get information about a book
    language = book.get('language')
    subjects = book.get_all('subject')
    book.pretty_print()

    # Modify existing elements
    book.set('title', 'Frankenstein 2')
    book.set_cover('cat_picture.jpg')
    book.set_identifier('http://github.com/davekeogh/epubmangler', 'URI')

    # Add and remove elements
    book.add('contributor', 'epubmangler', {'opf:role' : 'bkp'})
    book.remove('date', {'opf:event' : 'conversion'})

    # Add and remove subjects
    book.add_subject('Sequel')
    book.add_subject('Comedy')
    book.remove_subject('Horror tales')

    book.save('Frankenstein 2.epub', overwrite=True)

Metadata

Release files for epubmangler 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for epubmangler 0.1.0
File Size Uploaded
epubmangler-0.1.0.tar.gz 449.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for epubmangler 0.1.0
File Interpreter ABI Platform
epubmangler-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 459.5 kB

Release files / epubmangler-0.1.0.tar.gz

Download URL epubmangler-0.1.0.tar.gz
Size 449.3 kB
Tags Source
SHA-256 checksum
How to use checksums
25cc03e8c02cb0fc79c6ad5242fe8f8c89f9db2b9fcd46bb0e8eae71e1709135
BLAKE2b-256 checksum
How to use checksums
30d30215cb5108fec58f261d2259339ae23263f116e5b5b3a07cbd60b66a1e69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.8

Release files / epubmangler-0.1.0-py3-none-any.whl

Download URL epubmangler-0.1.0-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4967f93a2b0c6c53ac580d3bd6c32ec375a4500316a59659f29c3a9945c7daf
BLAKE2b-256 checksum
How to use checksums
2b8387001a7b1306bccaab0020b630d3d30f3db1d57f8561447a5b015bcbba07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.5.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page