-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
User patches
It is possible to add or change some provided features in KOReader by user patches (introduced in https://github.com/koreader/koreader/pull/9104).
For implementing or applying such patches only limited support might be given by the KOReader developers.
It is necessary to create a subfolder named patches
in the koreader
folder. (On Android this folder is located on the SD-card.)
The patch can than be put into a file in koreader\patches
. The content of the file has to be Lua
code and the extension of the file as to be .lua
The name of a patch has to start witch a number followed by a minus (1234-name-of-the-patch.lua
).
The execution time of a patch is determined by the first digit of the number in the patch name. If there are several patches starting with the same digit, the execution order is the natural order (1
<10
<11
<12
<13
<...<109
<...<10010
).
Names starting with:
-
0
are executed very early and only once after an update, -
1
are executed very early on every start of KOReader (but after0
if applicable), -
2
are executed after UIManager is ready on every start of KOReader, -
3-7
reserved -
8
are executed before exit and before settings get saved, -
9
are executed right before exit.
- On Android user patches don't work in the FDroid version of KOReader. The package id for such version is
org.koreader.launcher.fdroid
and it is installed either from FDroid application or using the apk file available at the mentioned page. You have to manually install the release version that has the package idorg.koreader.launcher
- 2-cre-rotate-japanese-book.lua: Formats books vertically for Japanese, Chinese etc. The fonts are not rotated -- you need to rotate the font itself. This is usually done with fontforge. One script that can do it is tategakifont. This solution is hacky and user edits to the patch are recommended. #11469
- 2-custom-sort.lua: An example of what you can do with custom file sorting algorithms.
- 2-dict-auto-copy-current-definition.lua: Possibility to share and/or copy into the clipboard dictionary definitions. #9336
- 2-infomessage-opening-filemanager.lua Show InfoMessage while opening the filemanager #12281
-
2-limit-crashlog-size.lua: Limits the size of the
crash.log
file (if available on the platform), can be of interest when verbose debugging is enabled. - 2-movable-not-movable.lua: Disable floating window movement? #9646
- 2-no-jump-in-flipping-mode.lua: Is it possbile to disable touch (navigate) property of the progress bar? #9277
- 2-no-keyboard-shortcuts.lua: Disable keyboard shortcuts on devices with keyboard (like the emulator).
- 2-overlap_arrow_32.lua: How can I modify arrow of page overlap function? #9181
-
2-TOC-title-patch.lua: adds a button in the table of contents to toggle between the book name and
Table of contents
. The selection is book specific, this was the origin of developing user-patches (thanks to @poire-z). - 2-touchmenu-update-clock.lua: Enable updating clock and battery state in the touchmenu every minute.
- 2-translator-http-override.lua: Translation has not been available in China since about one day ago #9574
- 2-disable-hw-invert.lua: disables hardware inversion for nightmode, in case it's unreliable on your device (generally, really old devices).
-
2-toggle-usbnet.lua: adds an entry in the
Network
menu to toggle usbnet.
Home |
- Changelog
- Install on Android
- Install on Cervantes
- Install on ChromeOS
- Install on Kindle
- Install on Kobo
- Install on PocketBook
- Install on ReMarkable
- Install on Desktop Linux
- Install on MacOS
- Install on Windows with WSL
- Install using Linux container (Docker, Podman)
Basic reading controls (click to open)
Advanced reading controls (click to open)
- Getting started
- Gestures
- Change defaults
- DPI control
- Style tweaks for misbehaving books
- Reflowing tweaks
- Screenshots
- Troubleshooting
- Android tips and tricks
- Auto frontlight
- Auto suspend
- Background runner
- Battery statistics
- Calibre
- Cover browser
- Cover image
- Frontlight gesture controller
- Goodreads (deprecated)
- Highlight exporter
- Japanese Support
- Keep alive
- News downloader
- Perception expander
- Progress sync
- Read timer
- Reading statistics
- Send2Ebook
- SSH
- System statistics
- Terminal emulator
- Time sync
- Vocabulary builder
- Wallabag