This Python script extracts text content from EPUB files located within a specified folder.
- Iterates through all EPUB files in a directory.
- Extracts text content from each book's document sections.
- Saves the extracted text as separate TXT files in the same folder.
- Python 3 (tested with 3.x)
ebooklib
library:- Install using
pip install ebooklib
-
Clone the repository:
git clone https://github.com/akumathedyn123/python-epub_extractor-epub2txt.git
-
Install dependencies:
cd epub-text-extractor pip install -r requirements.txt
-
Update folder path:
Open the script (
epub_extractor.py
) and edit theepub_folder
variable to point to the directory containing your EPUB files. -
Run the script:
python epub_extractor-epub2txt.py
Feel free to submit pull requests for improvements or bug fixes.
This project is licensed under the MIT License (see LICENSE file for details).