Python3 script to convert epub files to txt.
# setup virtual env (optional)
python3 -m venv venv
source venv/bin/activate
# install deps
pip install -r requirements.txt
python3 epub2txt.py <path-to-epub>
The txt file will have the same name as the original epub.