EPUB Language Identifier scans .epub and .mobi files and writes a CSV language report. It checks ebook metadata for both formats. For EPUB files, it also reads book text once and reuses that extracted text for ISBN-based language lookup and sampled text language detection.
The report columns are:
FILENAME,FROM_METADATA,FROM_ISBN,FROM_DETECTIONpython3 -m venv .venv
source .venv/bin/activate
pip install -e .Scan the current directory recursively and write language-report.csv:
epub-language-identifierScan a specific directory:
epub-language-identifier --path /path/to/booksChoose a report path:
epub-language-identifier --path /path/to/books --output /tmp/language-report.csvScan only the selected directory:
epub-language-identifier --path /path/to/books --no-recursiveShow per-file warnings:
epub-language-identifier --path /path/to/books --verboseWarnings cover metadata lookup, EPUB parsing, ISBN lookup, and text language detection failures. Without --verbose, files with failed detection steps are still included in the report with ? for unknown values.
python3 -m unittest discover -s testsThe CSV report is overwritten on each run. Keep ebook files outside the repository; .epub, .mobi, and generated report files are ignored by Git.