ReKoPub
Turn any web article into a clean EPUB for your e-ink reader.
ReKoPub is a small command-line tool. You give it a URL. It downloads the page, keeps the article itself (dropping navigation, ads, pop-ups and comments) and writes an EPUB tuned for grayscale e-ink screens. It is built for the reMarkable 2 and the Kobo Clara HD.
rekopub -URL https://example.com/some-article -SAVE ~/Books/
Features
-
Readable content only
Finds the main article text. Menus, ads, cookie banners, share buttons and comments are left out.
-
Tuned for e-ink
Images become grayscale and fit the screen, diagrams stay crisp, and fonts and margins are left to your reader.
-
Works offline
Images are embedded in the book. Title, author, date and language are filled in, and every book gets a cover.
-
Kobo-optimised
-KEPUBwrites a.kepub.epub, which Kobo opens with its faster renderer and reading stats. -
Safe saving
Never overwrites a file unless you pass
-FORCE, and never leaves a half-written book behind. -
Single binary
No runtime dependencies. One file for Linux, macOS or Windows; nothing to install.
Download
@VERSION@
built @DATE@ from commit
@SHORT@
| Computer | File |
|---|---|
| Windows (most PCs) | rekopub_windows_amd64.zip |
| Windows on Arm | rekopub_windows_arm64.zip |
| Mac with Apple silicon | rekopub_darwin_arm64.tar.gz |
| Mac with Intel | rekopub_darwin_amd64.tar.gz |
| Linux (x86-64) | rekopub_linux_amd64.tar.gz |
| Linux (Arm) | rekopub_linux_arm64.tar.gz |
checksums.txt lists the SHA-256 of each file.
Unpack the archive and put rekopub (rekopub.exe
on Windows) somewhere convenient. It's a command-line program, so run it
from Terminal, Command Prompt or PowerShell rather than by double-clicking.
The binaries aren't code-signed, so the first run may show a warning:
- Windows: SmartScreen may say "Windows protected your PC". Choose More info → Run anyway.
- macOS: Gatekeeper may refuse to open it. Run this once, in the folder where you unpacked it:
xattr -d com.apple.quarantine rekopub
With Go 1.26 or newer you can also build it yourself:
go install git.monoexp.com/bajdev/rekopub/cmd/rekopub@latest
Usage
rekopub -URL <url> -SAVE <path> [-FORCE] [-KEPUB]
rekopub -VERSION
| Flag | What it does |
|---|---|
-URL | The web page to convert. Must start with http:// or https://. Required. |
-SAVE | Where to write the book: a file or a folder. Missing folders are created. Required. |
-FORCE | Overwrite the output file if it already exists. |
-KEPUB | Write a Kobo KEPUB (.kepub.epub) instead of a plain EPUB. |
-VERSION | Print the version and exit. |
Flag names are case-sensitive: -URL works, -url does not.
Where the book is saved
- A folder, such as
~/Books/or an existing~/Books: the file name comes from the article title. - A path ending in
.epub: written to exactly that file. - Anything else, such as
~/Books/a: treated as a file name, with.epubadded.
Watch the trailing slash when the folder doesn't exist yet:
-SAVE ~/Books/new/ creates a folder called new,
while -SAVE ~/Books/new writes new.epub.
On success, the saved file's full path is printed, so it's easy to use in scripts.
Kobo Clara HD
Use -KEPUB for faster page turns and reading stats. Connect the Kobo by USB, tap Connect, and save straight to it:
# Linux
rekopub -URL https://example.com/article -SAVE /media/$USER/KOBOeReader/Articles/ -KEPUB
# macOS
rekopub -URL https://example.com/article -SAVE /Volumes/KOBOeReader/Articles/ -KEPUB
# Windows (the drive letter may differ)
rekopub.exe -URL https://example.com/article -SAVE E:\Articles\ -KEPUB
Eject the Kobo and the article appears in your library.
reMarkable 2
Use a plain EPUB, without -KEPUB. Save it on your computer:
rekopub -URL https://example.com/article -SAVE ~/reMarkable/
Then drag the file into the reMarkable desktop or mobile app, or upload it
through the USB web interface (Settings → Storage → USB web
interface, then open http://10.11.99.1).
Good to know
- Pages that build their content with JavaScript, paywalls and cookie walls can't be converted.
- ReKoPub only reads web pages: it never reads files on your computer, and pages on the internet can't make it connect to your own network.
- It sends no cookies, never logs in and runs no JavaScript. Every book records its source URL.
The README has the full details: exit codes, troubleshooting and privacy.
License
ReKoPub is free software, released under the MIT License. Copyright © 2026 bajdev.
It builds on these open-source Go libraries:
| Library | Used for | License |
|---|---|---|
| go-trafilatura | Article and metadata extraction | Apache-2.0 |
| go-epub | EPUB packaging | MIT |
| kepubify | KEPUB conversion | MIT |
| bluemonday | HTML sanitising | BSD-3-Clause |
| oksvg and rasterx | SVG rendering | BSD-3-Clause |
| dataurl | Images embedded in pages | MIT |
| uuid | Book identifiers | BSD-3-Clause |
| x/image, x/net, x/text, x/sync | WebP decoding, image scaling, cover fonts, HTML parsing, character sets | BSD-3-Clause |