Convert epub to txt with additonal utils
Project description
epub2txt
Convert epub to txt with additonal utils
Installation
pip install epub2txt
# pip install epub2txt -U # to upgrade
Fixes
- More resilent to mismatched tags
- Added
epub2txt.content_titles
, useful for creating metada when needed
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)
# output as a list of chapters
ch_list = epub2txt(filepath, outputlist=True)
# chapter titles will be available as epub2txt.content_titles if available
TODO
- 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.5.tar.gz
(6.9 kB
view details)
Built Distribution
File details
Details for the file epub2txt-0.1.5.tar.gz
.
File metadata
- Download URL: epub2txt-0.1.5.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.8.10 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33de38275c45846760af8b77ea6caf7d13f93a4b9c5f9a70cb860fa88714b3a3 |
|
MD5 | 6937079f0c23fd21080a895f6b68155d |
|
BLAKE2b-256 | cf7faa7c60c9ceaab28b21f17e99ad73f9b0c0a454d33937a4efed327c5d03ae |
File details
Details for the file epub2txt-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: epub2txt-0.1.5-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.1 CPython/3.8.10 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87bcab61802c4c88281865dcb3ee02e9a5b3a8d55ffc9fa7cc71b469fce63115 |
|
MD5 | 6874a9bc6c21f6889243f23f18030ce4 |
|
BLAKE2b-256 | d199a0170f198d524a7d95fd544b55b5411b347498567df2f3de7d7dda445eb2 |