a python package to read ePub infos and edit it.
Project description
EpubEdit
Regarding epubedit, this is a Python package for viewing and editing epub file metadata
Installation and Usage
- Installation:
pip install epubedit
- Usage
from epubedit import read_epub_info
book = read_epub_info('book_name')
book.get_infos()
Functions
read_info(str) -> str | list
Read the value of a single metadata Supported parameters: [ 'epub_version', "book_name", "author_name", "publisher_name", "ISBN", "ASIN", "bookid", "describe", "language", "rights", "publication_date", ]
Example:
from epubedit import read_epub_info
book = read_epub_info("Moby Dick.epub")
print(book.get_info('book_name'))
Running results
Moby Dick; Or, The Whale
read_infos(list) -> list
Pass a list and transmit the corresponding metadata values
from epubedit import read_epub_info
book = read_epub_info("Moby Dick.epub")
print(book.get_infos(["book_name", "epub_version", "language"]))
Running results
{"book_name": "Moby Dick; Or, The Whale", "epub_version": "3.0", "language": "en"}
read_all_infos() -> dict
No input value, all metadata information is transmitted. If there is a lack of relevant information in EPUB, it will return str: "" or list: []
book = read_epub_info('Moby Dick.epub')
print(book.get_all_infos())
Running results
{
"epub_version": "3.0",
"rights": "Public domain in the USA.",
"book_name": "Moby Dick; Or, The Whale",
"author": ["Herman Melville"],
"isbn": "",
"asin": "",
"publisher": "",
"published_date": "",
"modified_date": "2024-07-20T22:24:39Z",
"language": "en",
"subject": [
"Whaling -- Fiction",
"Sea stories",
"Psychological fiction",
"Ship captains -- Fiction",
"Adventure stories",
"Mentally ill -- Fiction",
"Ahab, Captain (Fictitious character) -- Fiction",
"Whales -- Fiction",
"Whaling ships -- Fiction",
],
}
Links
- GitHub Repository : EpubEdit
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
Built Distribution
File details
Details for the file epubedit-0.0.1.tar.gz
.
File metadata
- Download URL: epubedit-0.0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa2200952d4ad94d83ea0265e4094997b9b2ca64780d1f2aeb71f1c99600cca8 |
|
MD5 | 180231f22ebbbc72affef6bf9d0334ce |
|
BLAKE2b-256 | b241bd88ae72d6ac18e5fdcaa4c2edcda8f342ffe72499bfd10b3ac410197063 |
File details
Details for the file epubedit-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: epubedit-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a536844c805ce8647ca0535b0ff9d835bd1062b0da14136ed03ededd5bb49b62 |
|
MD5 | 1fc3878dc8fe6aabf0a2f28744ac1748 |
|
BLAKE2b-256 | 579d1570dc0bd0b32655f7eb8b5ac6224a5ffd03c8b0c6d9cf8e42288efb6ea9 |