• Stars
    star
    130
  • Rank 277,575 (Top 6 %)
  • Language
    Lua
  • License
    GNU Affero Genera...
  • Created over 11 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Base framework offering a Lua scriptable environment for creating document readers

koreader-base CircleCI

This is the base framework for creating document readers like KOReader, an e-ink device oriented reader application for various document formats.

It uses the MuPDF library (see http://mupdf.com/), djvulibre library, CREngine library, libk2pdfopt library and it is scripted using Lua (see http://www.lua.org/). To gain good speed at that, it uses the LuaJIT compiler.

It all started as the KindlePDFviewer application, which has since been greatly enhanced and now reflects this in having a new name, KOReader.

The code is distributed under the GNU AGPL v3 license (read the COPYING file).

Building

Follow these steps:

  • automatically fetch thirdparty sources with Makefile:

    • make sure you have patch, wget, unzip, git and svn installed
    • run make fetchthirdparty.
  • run make TARGET=kindlepw2 For Kindle models >= Paperwhite 2.

  • run make TARGET=kindle For Kindle models >= Kindle 4 < Paperwhite 2.

  • run make TARGET=kindle-legacy for Kindle DXG/2/3 devices.

  • or run make TARGET=kobo for Kobo devices.

  • or run make TARGET=pocketbook for PocketBook devices.

  • or run make TARGET=cervantes for BQ Cervantes devices.

  • or run make TARGET=android for Android devices.

  • or run make TARGET=win32 for Windows.

  • or run make TARGET=generic-arm for generic ARM devices.

  • or run make TARGET=ubuntu-touch for Ubuntu Touch.

  • or run make TARGET=appimage for the desktop AppImage.

  • or run make TARGET=debian, debian-armel or debian-armhf for a Debian package.

  • or run make KODEBUG=1 to build with debugging symbols.

  • or run make for the emulator on Linux.

Use ccache

Ccache can speed up recompilation by caching previous compilations and detecting when the same compilation is being repeated. In other words, it will decrease build time when the sources have already been built. Ccache support has been added to KOReader's build system. Before using it, you will need to install a ccache in your system.

  • in Ubuntu use:sudo apt-get install ccache
  • in Fedora use:sudo yum install ccache
  • install from source:
  • to disable ccache, use export USE_NO_CCACHE=1 before make.
  • for more detail about ccache. visit:

http://ccache.samba.org

Device emulation

The code also features a device emulation. You need SDL headers and library for this. It allows to develop on a standard PC and saves precious development time. It might also create a suboptimal desktop PDF viewer, depending on your view.

If you are using Fedora Core Linux, run yum install SDL2 SDL2-devel. If you are using Debian or Ubuntu, install the libsdl2-dev package.

By default, the build system builds in "emulation mode", so following is all you need to build the emulator:

make

The emulator uses 800x600 as the default resolution. It can be changed at runtime by changing the following environment variables:

EMULATE_READER_W=746 EMULATE_READER_H=1024

The emulator uses a default DPI of 160. This can also be changed with an environment variable:

EMULATE_READER_DPI=300

KOReader supports "viewports", i.e. displaying only in a rectangular excerpt of the screen. This is useful on devices where the framebuffer is larger than the area that is actually visible. In order to simulate such a viewport using the emulator, specify a specially crafted environment variable:

EMULATE_READER_VIEWPORT="{x=50,w=600,y=10,h=680}"

You can also simulate e-ink refresh with the emulator. When active, only refreshed areas of the screen are actually updated and you also get a visual inverse flash feedback. In order to activate that mode, set an environment variable to the number of milliseconds you want the flash to endure:

EMULATE_READER_FLASH=100

More Repositories

1

koreader

An ebook reader application supporting PDF, DjVu, EPUB, FB2 and many more formats, running on Cervantes, Kindle, Kobo, PocketBook and Android devices
Lua
16,198
star
2

kindlepdfviewer

(DEPRECATED, please use KOReader instead) A PDF (plus DJVU, ePub, TXT, CHM, FB2, HTML...) viewer made for e-ink framebuffer devices, using muPDF, djvulibre, crengine
Lua
498
star
3

kpvbooklet

KPVBooklet is a Kindle booklet for starting koreader/kindlepdfviewer and updating last access and percentage finished information in Kindle content catalog entry of the opened document.
Java
208
star
4

koreader-sync-server

self hostable synchronization service for koreader devices
Lua
162
star
5

android-luajit-launcher

Android NativeActivity based launcher for LuaJIT, implementing the main loop within Lua land via FFI
Kotlin
131
star
6

libk2pdfopt

k2pdfopt library for koreader, based on http://willus.com/k2pdfopt
C
89
star
7

crengine

This is the KOReader CREngine fork. It cross-pollinates with the official CoolReader repository at https://github.com/buggins/coolreader, in case you were looking for that one.
C++
70
star
8

koxtoolchain

Build script for various toolchains used by KOReader
Shell
54
star
9

contrib

Collection of non-official plugins designed for KOReader
Lua
34
star
10

virdevenv

virtual dev environment for koreader
Dockerfile
17
star
11

KoboUSBMS

Small helper to handle USBMS on Kobo in KOReader
C
15
star
12

ffi-cdecl

Automated C declaration extraction for FFI interfaces
Lua
14
star
13

sdcv

console version of StarDict formerly used by koreader; fork of https://github.com/Dushistov/sdcv
Makefile
10
star
14

koreader-misc

helper scripts and tools used/created by the dev team.
Python
9
star
15

lj-wpaclient

wpa_supplicant client library for LuaJIT
Lua
8
star
16

koreader-translations

KOReader localization.
7
star
17

koreader-fonts

Fonts for use in KOReader
6
star
18

evernote-sdk-lua

Unofficial Evernote SDK for Lua
Lua
6
star
19

android-send2ebook

**deprecated** send2ebook lets you send articles found on your android device to your ereader
Java
5
star
20

stardict-dictionaries

Script to quickly convert zip files to .tar.lz
Shell
2
star
21

doc

github page repo for hosting KOReader's documentation (write only)
HTML
1
star
22

koreader.github.io

Landing page for KOReader project
HTML
1
star
23

test-data

Test suit for various document formats
1
star