{"id":13761176,"url":"https://github.com/koreader/koreader-base","last_synced_at":"2025-04-07T06:10:40.090Z","repository":{"id":7624995,"uuid":"8984310","full_name":"koreader/koreader-base","owner":"koreader","description":"Base framework offering a Lua scriptable environment for creating document readers","archived":false,"fork":false,"pushed_at":"2024-04-10T20:16:01.000Z","size":13181,"stargazers_count":122,"open_issues_count":14,"forks_count":100,"subscribers_count":25,"default_branch":"master","last_synced_at":"2024-04-10T21:56:28.889Z","etag":null,"topics":["djvu","emulator","epub","ffi","koreader","leptonica","lua","luajit","mupdf","pdf","sdl","tesseract","ubuntu"],"latest_commit_sha":null,"homepage":"http://koreader.rocks/","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koreader.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2013-03-24T10:15:18.000Z","updated_at":"2024-04-14T17:48:20.032Z","dependencies_parsed_at":"2023-01-14T11:41:36.065Z","dependency_job_id":"cd44e6b5-6e33-4f89-bc2a-d1236ade886d","html_url":"https://github.com/koreader/koreader-base","commit_stats":{"total_commits":3501,"total_committers":84,"mean_commits":41.67857142857143,"dds":0.7643530419880035,"last_synced_commit":"82e6c282c2d741b2342cfef991dd8ad75f9319a7"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koreader%2Fkoreader-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koreader%2Fkoreader-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koreader%2Fkoreader-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koreader%2Fkoreader-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koreader","download_url":"https://codeload.github.com/koreader/koreader-base/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601448,"owners_count":20964864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["djvu","emulator","epub","ffi","koreader","leptonica","lua","luajit","mupdf","pdf","sdl","tesseract","ubuntu"],"created_at":"2024-08-03T13:01:41.903Z","updated_at":"2025-04-07T06:10:40.074Z","avatar_url":"https://github.com/koreader.png","language":"Lua","funding_links":[],"categories":["Lua"],"sub_categories":[],"readme":"## koreader-base [![CircleCI](https://circleci.com/gh/koreader/koreader-base.svg?style=svg)](https://circleci.com/gh/koreader/koreader-base)\n\nThis is the base framework for creating document readers like KOReader,\nan e-ink device oriented reader application for various document formats.\n\nIt uses the MuPDF library (see http://mupdf.com/), djvulibre library,\nCREngine library, libk2pdfopt library and it is scripted using Lua (see\nhttp://www.lua.org/). To gain good speed at that, it uses the LuaJIT compiler.\n\nIt all started as the KindlePDFviewer application, which has since been\ngreatly enhanced and now reflects this in having a new name, KOReader.\n\nThe code is distributed under the GNU AGPL v3 license (read the [COPYING](COPYING) file).\n\n## Building\n\nFollow these steps:\n\n* automatically fetch thirdparty sources with Makefile:\n  * make sure you have `patch`, `wget`, `unzip`, `git` and `svn` installed\n  * run `make fetchthirdparty`.\n* run `make TARGET=kindlehf` For kindle models running FW \u003e= 5.16.3 (Paperwhite 4 and later)\n\n* or run `make TARGET=kindlepw2` For Kindle models \u003e= Paperwhite 2.\n\n* or run `make TARGET=kindle` For Kindle models \u003e= Kindle 4 \u003c Paperwhite 2.\n\n* or run `make TARGET=kindle-legacy` for Kindle DXG/2/3 devices.\n\n* or run `make TARGET=kobov5` for Kobo/Tolino devices runing FW \u003e= 5.x\n\n* or run `make TARGET=kobov4` for Mk.7 \u0026 up Kobo devices running FW 4.x\n\n* or run `make TARGET=kobo` for Kobo devices.\n\n* or run `make TARGET=pocketbook` for PocketBook devices.\n\n* or run `make TARGET=cervantes` for BQ Cervantes devices.\n\n* or run `make TARGET=android` for Android devices.\n\n* or run `make TARGET=win32` for Windows.\n\n* or run `make TARGET=generic-arm` for generic ARM devices.\n\n* or run `make TARGET=ubuntu-touch` for Ubuntu Touch.\n\n* or run `make TARGET=appimage` for the desktop AppImage.\n\n* or run `make TARGET=debian`, `debian-armel` or `debian-armhf` for a Debian package.\n\n* or run `make KODEBUG=1` to build with debugging symbols.\n\n* or run `make` for the emulator on Linux.\n\n## Use ccache\n\nCcache can speed up recompilation by caching previous compilations and detecting\nwhen the same compilation is being repeated. In other words, it will decrease\nbuild time when the sources have already been built. Ccache support has been added to\nKOReader's build system. Before using it, you will need to install a ccache in your\nsystem.\n\n* in Ubuntu use:`sudo apt-get install ccache`\n* in Fedora use:`sudo yum install ccache`\n* install from source:\n  * get latest ccache source from http://ccache.samba.org/download.html\n  * unarchieve the source package in a directory\n  * cd to that directory and use:`./configure \u0026\u0026 make \u0026\u0026 sudo make install`\n* to disable ccache, use `export USE_NO_CCACHE=1` before make.\n* for more detail about ccache. visit:\n\nhttp://ccache.samba.org\n\nDevice emulation\n================\n\nThe code also features a device emulation. You need SDL headers and library\nfor this. It allows to develop on a standard PC and saves precious development\ntime. It might also create a suboptimal desktop PDF viewer, depending\non your view.\n\nIf you are using Fedora Core Linux, run `yum install SDL2 SDL2-devel`.\nIf you are using Debian or Ubuntu, install the `libsdl2-dev` package.\n\nBy default, the build system builds in \"emulation mode\", so following is all\nyou need to build the emulator:\n\n```\nmake\n```\n\nThe emulator uses 800x600 as the default resolution. It can be\nchanged at runtime by changing the following environment variables:\n\n```\nEMULATE_READER_W=746 EMULATE_READER_H=1024\n```\n\nThe emulator uses a default DPI of 160. This can also be changed with an environment variable:\n\n```\nEMULATE_READER_DPI=300\n```\n\nKOReader supports \"viewports\", i.e. displaying only in a rectangular\nexcerpt of the screen. This is useful on devices where the framebuffer\nis larger than the area that is actually visible. In order to simulate\nsuch a viewport using the emulator, specify a specially crafted environment\nvariable:\n```\nEMULATE_READER_VIEWPORT=\"{x=50,w=600,y=10,h=680}\"\n```\n\nYou can also simulate e-ink refresh with the emulator. When active, only\nrefreshed areas of the screen are actually updated and you also get a visual\ninverse flash feedback. In order to activate that mode, set an environment\nvariable to the number of milliseconds you want the flash to endure:\n```\nEMULATE_READER_FLASH=100\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoreader%2Fkoreader-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoreader%2Fkoreader-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoreader%2Fkoreader-base/lists"}