Convert epub to txt with additonal utils
Project description
epub2txt ![Codacy Badge](https://pypi-camo.freetls.fastly.net/68e66cb7090c5b3cfd3da0708de5d417e12b986c/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3035633432326461373361313463323362383762303635376166396338646637)
![Code style: black](https://pypi-camo.freetls.fastly.net/fbfdc7754183ecf079bc71ddeabaf88f6cbc5c00/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d626c61636b2d3030303030302e737667)
![License: MIT](https://pypi-camo.freetls.fastly.net/8645b002dd7ec1b54275a80574942e7a318e03c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)
![PyPI version](https://pypi-camo.freetls.fastly.net/dac0f9633b5e93bf0e596fc3cb19ac93e4e2875e/68747470733a2f2f62616467652e667572792e696f2f70792f65707562327478742e737667)
Convert epub to txt with additonal utils
Installation
pip install epub2txt
# pip install epub2txt -U # to upgrade
Usage
From command line
# convert test.epub to test.txt
epub2txt -f test.epub
# browse for epub file, txt file will be in the same directory as the epub file
epub2txt
# show epub book info: title and toc
epub2txt -i
# show more epub book info: title, toc, metadata, spine (list of stuff packed into the epub)
epub2txt -m
# show epub2txt version
epub2txt -V
python
code
from epub2txt import epub2txt
# from a url to epub
url = "https://github.com/ffreemt/tmx2epub/raw/master/tests/1.tmx.epub"
res = epub2txt(url)
# from a local epub file
filepath = r"tests\test.epub"
res = epub2txt(filepath)
TODO
- Extract a single chapter
- Batch conversion of several epub files
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
epub2txt-0.1.2a0.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for epub2txt-0.1.2a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9034bc975fcc0ea6622ef06410f327a2cf3ccefce5cb493e0474b631d79a4365 |
|
MD5 | 55aa834fdedc38456ed5bdfe532f2390 |
|
BLAKE2b-256 | 74fd546a3130d5db3489920e3b6897bca767efd6bae4cc1f18d8264b99e8a213 |