You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Go to file
NiLuJe fadee1f5dc
Clarify our OOP semantics across the codebase (#9586)
Basically:

* Use `extend` for class definitions
* Use `new` for object instantiations

That includes some minor code cleanups along the way:

* Updated `Widget`'s docs to make the semantics clearer.
* Removed `should_restrict_JIT` (it's been dead code since https://github.com/koreader/android-luajit-launcher/pull/283)
* Minor refactoring of LuaSettings/LuaData/LuaDefaults/DocSettings to behave (mostly, they are instantiated via `open` instead of `new`) like everything else and handle inheritance properly (i.e., DocSettings is now a proper LuaSettings subclass).
* Default to `WidgetContainer` instead of `InputContainer` for stuff that doesn't actually setup key/gesture events.
* Ditto for explicit `*Listener` only classes, make sure they're based on `EventListener` instead of something uselessly fancier.
* Unless absolutely necessary, do not store references in class objects, ever; only values. Instead, always store references in instances, to avoid both sneaky inheritance issues, and sneaky GC pinning of stale references.
  * ReaderUI: Fix one such issue with its `active_widgets` array, with critical implications, as it essentially pinned *all* of ReaderUI's modules, including their reference to the `Document` instance (i.e., that was a big-ass leak).
* Terminal: Make sure the shell is killed on plugin teardown.
* InputText: Fix Home/End/Del physical keys to behave sensibly.
* InputContainer/WidgetContainer: If necessary, compute self.dimen at paintTo time (previously, only InputContainers did, which might have had something to do with random widgets unconcerned about input using it as a baseclass instead of WidgetContainer...).
* OverlapGroup: Compute self.dimen at *init* time, because for some reason it needs to do that, but do it directly in OverlapGroup instead of going through a weird WidgetContainer method that it was the sole user of.
* ReaderCropping: Under no circumstances should a Document instance member (here, self.bbox) risk being `nil`ed!
* Kobo: Minor code cleanups.
2 years ago
.ci [CI] Don't hide docs generation log (#9204) 2 years ago
.circleci [CI] Also use Ubuntu 20.04 Docker image for docs (#9209) 2 years ago
.github GH: Extend the issue template to request verbose debug logs for non-crash issues. (#9585) 2 years ago
base@7484668769 Clarify our OOP semantics across the codebase (#9586) 2 years ago
doc [doc] Update busted version mentioned in docs (#9078) 2 years ago
frontend Clarify our OOP semantics across the codebase (#9586) 2 years ago
l10n@f18f0e5dd4 Update translations for 2022.07 (#9394) 2 years ago
metadata/en-US F-Droid description: tame expectations (#8178) 3 years ago
platform Kobo: Clara 2E fixes (#9559) 2 years ago
plugins Clarify our OOP semantics across the codebase (#9586) 2 years ago
resources Bump koreader-fonts to unbreak FreeFonts (#9508) 2 years ago
spec/unit Clarify our OOP semantics across the codebase (#9586) 2 years ago
test@86eeb0b43d various test/coverage optimization 8 years ago
tools Clarify our OOP semantics across the codebase (#9586) 2 years ago
.busted Travis update 9 years ago
.codecov.yml [CI] Add .codecov.yml (#4695) 5 years ago
.editorconfig experimental port to Mac OSX 8 years ago
.gitignore Add macOS target 4 years ago
.gitmodules add basic metadata for F-Droid 3 years ago
.luacheckrc Misc: Get rid of the legacy defaults.lua globals (#9546) 2 years ago
.luacov [CI] Also run coverage on plugins (#3447) 7 years ago
.shellcheckrc [CI] Add curly braces check (#5809) 4 years ago
.travis.yml quickstart fix (#2804) 7 years ago
COPYING switch license to AGPLv3 10 years ago
Makefile Build: Make sure the STL has proper permissions (#9478) 2 years ago
README.md Readme: Tame down expectations (#8177) 3 years ago
datastorage.lua Fix koreader not using XDG_CONFIG_HOME on linux (#8507) 2 years ago
defaults.lua Misc: Get rid of the legacy defaults.lua globals (#9546) 2 years ago
kodev Bump android backend (#7813) 3 years ago
reader.lua Assorted bag'o tweaks & fixes (#9569) 2 years ago
setupkoenv.lua setupkoenv: ffi.load: search rocks 2 years ago

README.md

KOReader

KOReader is a document viewer primarily aimed at e-ink readers.

AGPL Licence Latest release Gitter Mobileread Build Status Coverage Status Weblate Status

DownloadUser guideWikiDeveloper docs

Main features

  • portable: runs on embedded devices (Cervantes, Kindle, Kobo, PocketBook, reMarkable), Android and Linux computers. Developers can run a KOReader emulator in Linux and MacOS.

  • multi-format documents: supports fixed page formats (PDF, DjVu, CBT, CBZ) and reflowable e-book formats (EPUB, FB2, Mobi, DOC, CHM, TXT). Scanned PDF/DjVu documents can also be reflowed with the built-in K2pdfopt library.

  • full-featured reading: multi-lingual user interface with a highly customizable reader view and many typesetting options. You can set arbitrary page margins, override line spacing and choose external fonts and styles. It has multi-lingual hyphenation dictionaries bundled into the application.

  • integrated with calibre (search metadata, receive ebooks wirelessly, browse library via OPDS), Wallabag, Wikipedia, Google Translate and other content providers.

  • optimized for e-ink devices: custom UI without animation, with paginated menus, adjustable text contrast, and easy zoom to fit content or page in paged media.

  • extensible: via plugins

  • fast: on some older devices, it has been measured to have less than half the page-turn delay as the built in reading software.

  • and much more: look up words with StarDict dictionaries / Wikipedia, add your own online OPDS catalogs and RSS feeds, over-the-air software updates, an FTP client, an SSH server, …

Please check the user guide and the wiki to discover more features and to help us document them.

Screenshots

Installation

Please follow the model specific steps for your device:

AndroidCervantesKindleKoboLinuxPocketbookreMarkable

Development

Setting up a build environmentCollaborating with GitBuilding targetsPortingDeveloper docs

Support

KOReader is developed and supported by volunteers all around the world. There are many ways you can help:

Right now we only support liberapay donations, but you can also create a bounty to motivate others to work on a specific bug or feature request.

Contributors

Last commit Commit activity