-
Notifications
You must be signed in to change notification settings - Fork 16
User Patches
KOReader User Patches allow you to customize, extend, or monkey-patch KOReader and plugin behavior at startup without modifying core source code.
This page catalogs community-maintained user patches designed to work alongside the KOReader X-Ray plugin (xray.koplugin).
- Repository: Dukko/xray-patch
-
Patch File:
2-xray-entity-footnotes.lua - Target Plugin: ultimatejimmy/xray.koplugin
The Entity Footnotes patch brings in-text visual indicators and interactive tap popups for AI-extracted entities. While the core X-Ray plugin provides in-text underlines and tooltips for unit conversions, this patch extends the same mechanism to:
- Characters & Key Figures
- Historical Figures
- Locations & Settings
- Glossary & World Terminology
When reading, recognized names and terms are subtly underlined. Tapping an underlined entity brings up a footnote-style popup showing the AI-generated description directly over the page without needing to open the full X-Ray menu or search dictionaries.
- In-Text Underlines: Automatically underlines known entities in your current chapter or page using the same rendering engine as X-Ray's unit converter.
- Tap-to-Reveal Popups: Displays character bios, location descriptions, and glossary definitions on tap.
- Chunked Scanning: Scans page text in chunked batches across the book text to process entity mentions.
- Category Filters: Configure which entity types should be underlined (e.g., characters only, locations only, or all entities).
-
Non-Destructive: Does not modify
xray.kopluginsource files. Updating the base X-Ray plugin will not overwrite or disable this patch.
If you use the Storefront plugin manager for KOReader, you can download and install community user patches directly on your device:
- Open KOReader and navigate to Tools Menu (wrench icon) → Storefront.
- Go to the User Patches section or search for Entity Footnotes / X-Ray Patch.
- Tap Install (Storefront automatically places
2-xray-entity-footnotes.luainto yourpatches/directory). - Restart KOReader when prompted.
- Download the latest
2-xray-entity-footnotes.luafrom the Dukko/xray-patch Releases page (or grab it from thepatches/folder in the repository). - Copy the file into your device's KOReader patches directory:
-
Linux / Android / Kobo / Kindle:
koreader/patches/2-xray-entity-footnotes.lua(orkoreader/settings/patches/depending on your KOReader folder layout).
-
Linux / Android / Kobo / Kindle:
- Restart KOReader.
- Open a book with fetched X-Ray data. In the X-Ray menu, navigate to Entity Footnotes to enable the feature, select active categories, or trigger a manual rescan.
- Blocking Scan Operation: While the scan is split into chunks, the scan routine is blocking / synchronous. When opening a new chapter or re-scanning books with extensive entity databases, you may experience perceptible UI pauses or momentary delays.
- Language Fallback: As an external patch, menu items and notifications default to English regardless of KOReader's active UI locale.
- Case-Sensitive Matching: Matches entities with exact casing to avoid false-positive collisions with common lowercase words (e.g., matching the surname "Black" rather than the color "black").
KOReader executes Lua scripts located in the patches/ folder in alphanumeric order during the startup boot sequence (e.g., 1-patch.lua, 2-patch.lua).
| Action | Via Storefront | Manual Method |
|---|---|---|
| Install | Browse to the patch in Storefront and tap Install. | Place the .lua patch script into koreader/patches/ and restart KOReader. |
| Update | Check the updates section in Storefront and tap Update. | Overwrite the existing patch file in koreader/patches/ with the new version and restart. |
| Disable / Remove | Toggle or remove the patch in Storefront. | Delete the .lua file from koreader/patches/ (or rename to .lua.disabled) and restart KOReader. |
Have you created or found another user patch for X-Ray? Feel free to share it in the GitHub Issues / Discussions so it can be added to this community list.
- Lookups & Navigation — native in-text lookups, footnote popup UI, and unit converter settings.
- Core Content & Features — overview of characters, locations, glossary, and timeline entities.
- Advanced Configuration — manual config editing, dispatcher actions, and logging.