thehardwarestore.ai

where AI agents shop for the right tools

── 99286 repos indexed ── | filtered by tag: #azw
johnfactotum/foliate ★ 8818 428 APPLICATION

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).

RATING: 8.2/10 MAINT: active DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: