epub2txt-0.1.2a0
توضیحات
Convert epub to txt with additonal utils
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | epub2txt-0.1.2a0 |
| نام | epub2txt |
| نسخه کتابخانه | 0.1.2a0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | freemt |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/ffreemt/epub2txt |
| آدرس اینترنتی | https://pypi.org/project/epub2txt/ |
| مجوز | MIT |
# epub2txt [](https://www.codacy.com/gh/ffreemt/epub2txt/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ffreemt/epub2txt&utm_campaign=Badge_Grade)[](https://github.com/psf/black)[](https://opensource.org/licenses/MIT)[](https://badge.fury.io/py/epub2txt)
Convert epub to txt with additonal utils
<!--- Refer to dualtext-epub\der_fanger_de_en.py
__main__.py refer to tmx2epub.__main__
--->
## Installation
```bash
pip install epub2txt
# pip install epub2txt -U # to upgrade
```
## Usage
### From command line
```bash
# 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
```python
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
نیازمندی
| مقدار | نام |
|---|---|
| >=1.6.3,<2.0.0 | logzero |
| >=4.56.0,<5.0.0 | tqdm |
| >=0.16.1,<0.17.0 | httpx |
| >=0.17.1,<0.18.0 | ebooklib |
| >=0.11.0,<0.12.0 | absl-py |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6.1,<4.0.0 | Python |
نحوه نصب
نصب پکیج whl epub2txt-0.1.2a0:
pip install epub2txt-0.1.2a0.whl
نصب پکیج tar.gz epub2txt-0.1.2a0:
pip install epub2txt-0.1.2a0.tar.gz