A python library for reading/editing mobi/azw3 metadata.
Project description
mobi_header
A python library for reading/editing mobi/azw3 metadata.
Install: pip install mobi_header
class
MobiHeader
variables:
- file_path: str, path of mobi/azw3 file.
- palm_doc: a PalmDoc object, contain palmdoc's header and records.
- metadata: a python dict, use offset as key, the metadata of file.
- exth_value: a python list, the exth metadata of file.
method:
-
change_title(title : str):
change the title of metadata.
-
change_metadata(id : int, value):
change the mobi metadata. the value will be convert to origin dtype.
-
change_exth_metadata(id : int, value):
change the mobi exth metadata. the value will be convert to origin dtype.
-
get_exth_value_by_id(id : int):
return the value of id in exth metadata.
-
to_file(file : [str, None] = None):
write metadata to file. Default write to origin file.
About metadata and exth-metadata, the detail see here
Example
from mobi_header import MobiHeader
foo = MobiHeader("example.azw3")
foo.change_exth_metadata(501, "PDOC")
foo.to_file()
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
Hashes for mobi_header-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05d205998d684c3e5a1450fca6589980286eec999e6b53ed922c7ba1760aac37 |
|
MD5 | 3f59b9e179834ae0b29c5d38afc1b531 |
|
BLAKE2b-256 | 435c55421c76ae4a1ca6a3ae5f085452807da3ac4e56ff26bb676f4dca068d3a |