diff options
| author | historia <historiavg@proton.me> | 2026-08-26 17:46:48 -0400 |
|---|---|---|
| committer | historia <historiavg@proton.me> | 2026-08-26 17:46:48 -0400 |
| commit | 6ccb6d443d2fb871b43d96ea61a95bc3e6a92355 (patch) | |
| tree | d692ddccd6ec212cf4ebabb25a85e83af479d0fe /app/converter/extractors.py | |
| parent | c147087c9d4707bffaeee58d390653637a21cce8 (diff) | |
| download | tts-audiobook-generator-6ccb6d443d2fb871b43d96ea61a95bc3e6a92355.tar.gz | |
feat: combined install/configure tui screens into one menu, removed extraneous wizard screens
Diffstat (limited to 'app/converter/extractors.py')
| -rw-r--r-- | app/converter/extractors.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/converter/extractors.py b/app/converter/extractors.py index a564333..f05d451 100644 --- a/app/converter/extractors.py +++ b/app/converter/extractors.py @@ -79,8 +79,7 @@ def extract_book(file_path: Path) -> Book: def _epub_metadata(file_path: Path) -> tuple: """Return (title, author) from an EPUB's Dublin Core metadata.""" try: - import ebooklib - from ebooklib import epub + from ebooklib import epub # raises ImportError when unavailable book = epub.read_epub(str(file_path)) title = _first_dc_value(book.get_metadata("DC", "title")) @@ -116,8 +115,6 @@ def _first_dc_value(entries) -> str: def _extract_epub_chapters(file_path: Path) -> List[Section]: """Return one Section per EPUB spine document (chapter), in reading order.""" - import ebooklib - book = None for method in (_read_epub_ebooklib, _read_epub_zipfile, _read_epub_manual): try: |
