Calibre is a comprehensive e-book management application that functions as a library manager, format converter, metadata editor, device synchronization tool, and content server. The codebase is a large monolith written primarily in Python with C/C++ extensions for performance-critical operations (PDF rendering, character encoding detection, compression). It provides a full desktop GUI built on PyQt6, a CLI for headless operations (calibredb, ebook-convert), and an embedded HTTP/OPDS server for remote library access. The architecture follows a plugin pattern: format conversion (input/output plugins), device drivers (USBMS, MTP, dedicated reader drivers), store search plugins, metadata source plugins, and AI provider plugins (OpenAI, Anthropic, Ollama). The core database is SQLite with full-text search (FTS5). Extensively cross-platform (Windows, macOS, Linux) with platform-specific launcher code in C. While the codebase shows high craftsmanship in many areas (e.g., SQLite extensions, font parsing, AI abstraction), it also carries legacy components such as an old RTF parser, vendored libraries (tinycss, frozen), and some device drivers for obsolete readers. Overall, it is actively maintained with regular commits and responsive issue triage.
TranslateBooksWithLLMs is a full-stack web application for translating eBooks (EPUB, DOCX, TXT, SRT) using multiple LLM providers (Ollama, OpenAI, Gemini, Mistral, DeepSeek, Poe, OpenRouter, NVIDIA NIM, LiteLLM). The architecture is a Flask server with Socket.IO for real-time progress streaming, a JavaScript SPA frontend with i18n support across 7 locales, and a SQLite-based checkpoint/resume system for interrupted translations. The core pipeline extracts content with HTML/XML placeholder preservation, chunks text using tiktoken-aware splitting, translates via configurable LLM providers with multi-phase fallback (LLM → token alignment → original), and reconstructs the output file. Additional features include glossary management with NER-based term suggestion, style extraction from source text, TTS generation via Edge-TTS and Chatterbox, and a comprehensive benchmark framework for evaluating translation quality across 35+ languages. The codebase demonstrates strong engineering with clean abstractions (adapter pattern for formats, factory pattern for LLM providers, generic orchestrator for translation pipeline), extensive testing (unit, integration, characterization with golden snapshots, e2e), and several genuinely reusable components. Notable patterns include a token-aware chunker with exact reassembly, an API key pool with round-robin rotation on 429 responses, an ordered concurrent executor that preserves chunk ordering, a retry manager with exponential backoff and circuit breaker, and a placeholder system for preserving HTML/XML structure during LLM translation. The benchmark subsystem and prompt optimization tool are supporting features that add research value but are secondary to the core application purpose.
This repository provides a fully-featured, cross-platform document reader and annotator for PDF, EPUB, and HTML snapshots, used as the core reading interface within the Zotero reference management ecosystem. It integrates PDF.js and EPUB.js for rendering, and a custom Structured Document Text (SDT) pipeline for cross-format search, reading mode (reflow), and read-aloud (TTS) with both browser-native and remote voice providers. The architecture is modular: a platform-agnostic common layer defines core abstractions (View, AnnotationManager, FocusManager, KeyboardManager, ReaderUI), with platform-specific bindings for Zotero desktop, web, iOS WebKit, and Android. The UI is built with React and features annotation tools (highlight, underline, note, ink, image, text), sidebar with thumbnails/annotations/outline, find-in-document via a web worker, and extensive keyboard navigation. Annotation management supports undo/redo, debounced saving, filtering, and export. The codebase demonstrates strong engineering practices with reusable design patterns (LRU cache, approximate string matching, navigation history, popup delay), but also contains large monolithic controller classes (Reader, PDFView) that handle many responsibilities. Overall, it is a high-quality, actively maintained application with sophisticated document processing capabilities.
KOReader is a document viewer application primarily designed for e-ink readers, supporting a wide range of formats including PDF, EPUB, DjVu, CBZ, and more. It provides a full-featured reading experience with file management, annotation, dictionary lookup, OPDS catalog browsing, Calibre integration, cloud storage, and extensive customization through a plugin system. The architecture is a monolithic Lua application built on a custom widget toolkit with an event-driven UI manager, platform-specific device abstraction layers (Kindle, Kobo, PocketBook, reMarkable, Android, SDL), and a robust caching and rendering pipeline. Key entry points are `reader.lua` for the main application and `kodev` for development/testing. The codebase is large and mature, with a strong emphasis on performance and e-ink optimization, but shows some technical drift in the form of deprecated code paths, platform-specific hacks, and a fragmented keyboard layout system.
This repository is a CLI tool for translating books (EPUB, TXT, PDF, SRT, Markdown) into bilingual versions (original + translation side-by-side) using large language models (OpenAI, Anthropic, Gemini, etc.) and free machine translation engines. It supports multiple translation backends, a provider configuration system, and a PDF-to-EPUB pipeline using docling for PDF extraction and Pandoc for EPUB export. The architecture is modular: loaders parse input formats, translators handle API calls with session context and capability probing, and a pipeline orchestrates PDF-to-EPUB conversion with figure rendering and classification. Key entry points are `make_book.py` and the installed command `bbook_maker`. The tool includes features like plan mode for selective translation, glossary support, resume, progress bars, and Docker support. It has extensive tests covering CLI contract, loaders, translators, pipeline stages, and documentation. External dependencies include LLM APIs, docling, pypdfium2, Pandoc, and various SDKs. The codebase demonstrates careful engineering decisions around capability degradation, session compaction, glossary learning, and structured output ladder. It is a well-maintained application with active development and low technical drift.
CheatReader is a Flutter-based desktop ebook reader designed for low-distraction reading. It provides a floating, always-on-top window that supports single-line and multi-line reading modes, transparency, a boss key for quick hide/restore, system tray integration, and app disguise (icon/name change). The application imports local files in multiple formats (txt, epub, html, md, fb2, docx, pdf) via text extraction, never modifying the source. It features a bookshelf with reading progress tracking, customizable keyboard shortcuts, auto page-turn, full-text search, and a control panel for all settings. The architecture is a standard Flutter app with platform-specific abstractions for window management, file import, and startup behavior, targeting Windows, macOS, and Linux. The codebase is well-tested, localized in English and Chinese, and uses a spec-driven development process (OpenSpec). While the main reader surface widget is large (~2600 lines), the overall structure demonstrates solid engineering with reusable patterns for platform abstraction, settings persistence, and text extraction.
EPUBCheck is the official W3C conformance checker for EPUB publications. It validates EPUB 2 and EPUB 3 files against the respective specifications, including OCF packaging, OPF metadata, XHTML/SVG content, CSS, media overlays, navigation documents, and accessibility metadata. The tool operates as a Java command-line application and library, using a modular checker architecture where dedicated handlers validate specific resource types (e.g., OCFChecker, OPFChecker, OPSChecker, CSSChecker). Validation is driven by a combination of RelaxNG schemas for structural rules and Schematron for cross-cutting constraints. The project includes an extensive test suite using Cucumber/BDD features and thousands of test EPUB packages covering error and valid scenarios across all profile extensions (ePub 3, EDUPUB, dictionaries, indexes, multiple renditions, previews, and region-based navigation).
Foliate is a desktop e-book reader for GNOME/Linux, built with GTK4, Libadwaita, and GJS (GNOME JavaScript). It supports EPUB, Mobipocket, Kindle, FB2, CBZ, and PDF formats, using WebKitGTK to render book content via a custom JavaScript rendering engine (foliate-js). The application provides a full-featured reading experience with paginated and scrolled modes, customizable fonts and themes, annotations (highlights, notes, bookmarks), text-to-speech via Speech Dispatcher, OPDS catalog browsing, and dictionary/Wikipedia lookups. Architecture: The main entry point is src/main.js, which initializes the GJS application and loads the GResource-bundled source files. The core UI is defined in src/app.js (window creation, file handling) and src/book-viewer.js (reading view with sidebar, search, navbar, TTS). The library view (src/library.js) manages book collections and OPDS integration. Reading state (annotations, bookmarks, progress) is persisted per-book as JSON files in the user's data directory. The rendering pipeline lives in the WebView: src/reader/reader.js handles content display, CSS injection, and footnotes, while the foliate-js submodule parses e-book formats into a pageable model. External dependencies: GNOME platform (GTK 4.12, Libadwaita 1.8, WebKitGTK 6.0, GJS 1.82), Speech Dispatcher for TTS, Tracker (optional) for file indexing, and third-party APIs (Wiktionary, Wikipedia, Google Translate) for lookup tools. The build system uses Meson, with Flatpak and Snap packaging provided. Internationalization across 30+ languages is maintained via gettext PO files. Data flows: User opens a file → book is parsed by foliate-js into a structured document model → rendered in WebView → user interactions (scroll, search, annotate, bookmark) are communicated back to GJS via the WebView's async RPC pattern (exec/iter/provide) → state is persisted as JSON files. OPDS catalogs are fetched via HTTP and rendered in a separate WebView frontend (src/opds/main.html).
Episteme is a modern, cross-platform e-book and document reader built with Kotlin Multiplatform and Compose Multiplatform. It supports a wide array of formats including EPUB, PDF, MOBI, audiobooks (M4B), FB2, DOCX, ODT, PPTX, and comic archives (CBZ/CBR). The app offers a rich reading experience with paginated and vertical scroll modes, text-to-speech, ink and text annotations, OPDS catalog browsing, cloud sync via Google Drive and Firestore, AI-powered summarization, and extensive customization (themes, fonts, brightness). The codebase is organized into a shared module containing core business logic, models, and policies, with platform-specific implementations for Android (native Compose, Room, WorkManager), iOS (Swift), and Desktop (Compose Desktop, Swing interop). The architecture follows a clean separation of concerns with expect/actual abstractions for platform services, making it a strong example of production-ready KMP application design.
This repository hosts the static website re0-web, which provides a Chinese translation of the Japanese light novel series 'Re:Zero - Starting Life in Another World'. The system is a pipeline that crawls the original Japanese text from an online source, applies translations (likely manual or semi-automated), formats the content into Markdown, builds a static site using mdbook, and deploys it via GitHub Pages. The core application logic resides in Python scripts under `py/`, including a crawler, translator, formatter, and index generator. Build and deployment are automated through GitHub Actions workflows. The repository also includes pre-built EPUB files, images, and a Dockerfile for local development. While the project is a fan translation effort, its architecture demonstrates a well-structured ETL-to-static-site pipeline with CI/CD, making it a practical example of automated content publishing.
This repository provides a Python CLI tool and Makefile pipeline to scrape all essays from Paul Graham's website (paulgraham.com), convert them to Markdown, and produce an EPUB ebook. The core logic resides in a single script (`graham.py`) that uses `requests`, `BeautifulSoup`, `html2text`, and `htmldate` to download, parse, and date-stamp each essay. A `Makefile` orchestrates the full build: creating a virtual environment, fetching essays, merging them with `pandoc`, and generating the final EPUB with a custom CSS and an iBooks dark-mode patch. The CI workflow (GitHub Actions) runs daily, detects new essays by comparing article counts, and automatically creates a release with the updated EPUB and metadata CSV. The architecture is straightforward—no web server, database, or tests—but the pipeline is robust and well-documented for its single purpose. While the scraper is tightly coupled to Paul Graham's site structure, several components (the iBooks patcher, the footnote conversion function, and the EPUB stylesheet) are cleanly isolated and reusable in other EPUB generation projects.
This repository is a documentation build system for producing a study guide for the Claude Certified Architect - Foundations exam. The core functionality resides in the `exam-preparation-guide.md` source file, which is transformed into PDF and EPUB formats via a Pandoc-based build script. The architecture is straightforward: a shell script (`scripts/build-release-assets.sh`) processes the Markdown with Pandoc, applying styling and metadata from the `publishing/` directory, and outputs artifacts to `dist/`. A GitHub Actions workflow (`.github/workflows/release.yml`) automates the build and release process when version tags are pushed. The system relies on external dependencies like Pandoc, XeLaTeX, and standard TeX Live packages for PDF generation. While not a complex software application, it demonstrates solid documentation engineering practices with a reusable build pipeline and clear separation of concerns between content, styling, and build automation.
Koodo Reader is a cross-platform ebook reader application supporting a wide range of formats (EPUB, PDF, MOBI, AZW3, TXT, FB2, CBR/CBZ, MD, DOCX, HTML, etc.). It is built as an Electron desktop app with a React/TypeScript frontend and a separate Go HTTP server for OPDS catalog serving and KOReader sync. The application provides a full-featured reading experience including bookmarks, notes, highlights, text-to-speech (with multiple voice engines), translation and dictionary lookup (via built-in and custom plugins), OCR for scanned PDFs, and cloud sync/backup across many providers (WebDAV, S3, OneDrive, Google Drive, Dropbox, etc.). It also includes a library management system with shelves, tags, search, and import from local files, folders, URLs, and OPDS catalogs. The architecture is a monolith with a clear separation between the Electron main process (Node.js) and the renderer (React), plus an optional Go server for network-facing features. The codebase is large and feature-rich but shows signs of technical debt: widespread use of deprecated React lifecycle methods, heavy reliance on opaque minified libraries (kookit-extra), frequent `as any` type casts, and mixed Chinese/English comments. Despite these issues, the application is actively maintained and offers a robust set of features for ebook enthusiasts.
Elib2Ebook is a .NET 10 application that downloads books from 60+ online libraries (Litres, MyBook, BookRiver, etc.) and converts them into standard ebook formats (EPUB, FB2, CBZ, JSON, TXT). It is a dual-deployment solution: a CLI tool and a Blazor web UI, both sharing a core domain and service layer. The architecture is a layered .NET solution with Domain, DomainServices, and per-site ExternalServices projects, using a reflection-based GetterFactory to auto-discover site adapters. The system handles site-specific anti-bot measures, authentication, and pagination, then normalizes content into a common domain model before passing it to format-specific builders.
LibreraReader is a full-featured, multi-format e-book reader for Android (with an experimental iOS/desktop port via Kotlin Multiplatform). It supports PDF, EPUB, MOBI, DjVu, FB2, CBR/CBZ, DOC/DOCX, ODT, RTF, and many other formats through a combination of native C/C++ libraries (MuPDF, DjVuLibre, libmobi, libantiword, libwebp, liblame) and Java-based document translators (ODF/SVM/WMF to HTML/SVG). The app provides a rich reading experience with customizable themes, text-to-speech, OPDS catalog browsing, cloud sync (Google Drive, Dropbox), annotations, bookmarks, and a smart reflow feature for scanned documents. The codebase is large and monolithic, with significant third-party code vendored into the source tree. Development has been frozen (as noted in the README), so the project is in a maintenance-only state. Despite its age and complexity, it contains several well-crafted, reusable utility libraries (e.g., LWXML streaming XML framework, SVM-to-SVG translator, and general-purpose Android utilities) that could be extracted for other projects.
This repository implements a desktop application for batch processing EPUB ebooks, including reformatting, encryption/decryption (filename obfuscation), font encryption/decryption with OCR-based recognition, image compression and conversion, cover replacement, and Chinese text conversion. The application is built with Tauri 2 (Rust) as the desktop shell, Vue 3 with TypeScript for the frontend, and a Python sidecar for the heavy processing tasks. Communication between the frontend and Python backend uses a JSON Lines protocol over stdin/stdout, with protobuf schemas defining the message envelopes. The architecture follows a clear separation of concerns: the Rust layer manages the application lifecycle, window effects, and sidecar process; the Vue frontend provides a drag-and-drop interface with task panels, persistent state management, and custom UI components; the Python backend implements a task runner that dispatches work to specialized service modules for EPUB structure manipulation, font obfuscation with ONNX OCR inference, image processing, and text conversion. The system includes a comprehensive test suite covering unit tests, integration tests, and protocol contract tests. Notable design patterns include a reusable EPUB workspace abstraction with security validation, a protocol layer with dataclass-based request/response models, safe JSON serialization handling edge cases like lone surrogates, and Vue composables for persistent state and Tauri IPC bridging. The font encryption/decryption services demonstrate advanced CSS cascade emulation and glyph rendering with OCR, though they contain significant code duplication. The README explicitly states that this repository is historical and that EPUB capabilities have been migrated to a Rust implementation (epub_tool_rust). As such, the project is deprecated and no longer actively developed, but the codebase remains a well-structured example of a cross-platform desktop application with a Python sidecar.