Tools to modify the metadata of .epub format ebooks
Project description
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
epubmangler-0.1.0.tar.gz
(449.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file epubmangler-0.1.0.tar.gz.
File metadata
- Download URL: epubmangler-0.1.0.tar.gz
- Upload date:
- Size: 449.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25cc03e8c02cb0fc79c6ad5242fe8f8c89f9db2b9fcd46bb0e8eae71e1709135
|
|
| MD5 |
33f56a7a7bc3b8d4962e7cbf0031bf52
|
|
| BLAKE2b-256 |
30d30215cb5108fec58f261d2259339ae23263f116e5b5b3a07cbd60b66a1e69
|
File details
Details for the file epubmangler-0.1.0-py3-none-any.whl.
File metadata
- Download URL: epubmangler-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4967f93a2b0c6c53ac580d3bd6c32ec375a4500316a59659f29c3a9945c7daf
|
|
| MD5 |
db76183c940b71ce08cc2bda8106819a
|
|
| BLAKE2b-256 |
2b8387001a7b1306bccaab0020b630d3d30f3db1d57f8561447a5b015bcbba07
|