index.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>ReKoPub: web articles as e-ink EPUBs</title>
  7. <meta name="description" content="ReKoPub is a small command-line tool that turns a web article into a clean EPUB for the reMarkable 2 and Kobo Clara HD.">
  8. <meta name="color-scheme" content="light dark">
  9. <link rel="canonical" href="https://rekopub.monoexp.com/">
  10. <link rel="icon" href="/favicon.svg" type="image/svg+xml">
  11. <link rel="stylesheet" href="/style.css">
  12. </head>
  13. <body>
  14. <!--
  15. Published by the monoexp.com pipeline on every merge into main. It fills
  16. in the version, commit and date placeholders below and builds the files
  17. in /download/ (see "Releasing" in README.md).
  18. -->
  19. <header class="site-header">
  20. <div class="wrap header-inner">
  21. <a class="wordmark" href="/">reko<span>pub</span></a>
  22. <nav aria-label="Main">
  23. <a href="#download">Download</a>
  24. <a href="#usage">Usage</a>
  25. <a href="https://git.monoexp.com/bajdev/ReKoPub">Source</a>
  26. </nav>
  27. </div>
  28. </header>
  29. <main class="wrap">
  30. <section class="about" aria-labelledby="about-title">
  31. <h1 id="about-title">ReKoPub</h1>
  32. <p class="lede">Turn any web article into a clean EPUB for your e-ink reader.</p>
  33. <p>
  34. ReKoPub is a small command-line tool. You give it a URL. It downloads
  35. the page, keeps the article itself (dropping navigation, ads, pop-ups
  36. and comments) and writes an EPUB tuned for grayscale e-ink screens.
  37. It is built for the <strong>reMarkable 2</strong> and the
  38. <strong>Kobo Clara HD</strong>.
  39. </p>
  40. <pre><code>rekopub -URL https://example.com/some-article -SAVE ~/Books/</code></pre>
  41. </section>
  42. <section id="features" aria-labelledby="features-title">
  43. <h2 id="features-title">Features</h2>
  44. <ul class="cards">
  45. <li class="card">
  46. <h3>Readable content only</h3>
  47. <p>Finds the main article text. Menus, ads, cookie banners, share buttons and comments are left out.</p>
  48. </li>
  49. <li class="card">
  50. <h3>Tuned for e-ink</h3>
  51. <p>Images become grayscale and fit the screen, diagrams stay crisp, and fonts and margins are left to your reader.</p>
  52. </li>
  53. <li class="card">
  54. <h3>Works offline</h3>
  55. <p>Images are embedded in the book. Title, author, date and language are filled in, and every book gets a cover.</p>
  56. </li>
  57. <li class="card">
  58. <h3>Kobo-optimised</h3>
  59. <p><code>-KEPUB</code> writes a <code>.kepub.epub</code>, which Kobo opens with its faster renderer and reading stats.</p>
  60. </li>
  61. <li class="card">
  62. <h3>Safe saving</h3>
  63. <p>Never overwrites a file unless you pass <code>-FORCE</code>, and never leaves a half-written book behind.</p>
  64. </li>
  65. <li class="card">
  66. <h3>Single binary</h3>
  67. <p>No runtime dependencies. One file for Linux, macOS or Windows; nothing to install.</p>
  68. </li>
  69. </ul>
  70. </section>
  71. <section id="download" aria-labelledby="download-title">
  72. <h2 id="download-title">Download</h2>
  73. <div class="release">
  74. <p class="release-version">
  75. <strong>@VERSION@</strong>
  76. <span>built @DATE@ from commit
  77. <a href="https://git.monoexp.com/bajdev/ReKoPub/commit/@COMMIT@"><code>@SHORT@</code></a></span>
  78. </p>
  79. <table class="downloads">
  80. <thead>
  81. <tr><th scope="col">Computer</th><th scope="col">File</th></tr>
  82. </thead>
  83. <tbody>
  84. <tr><td>Windows (most PCs)</td><td><a href="/download/rekopub_windows_amd64.zip">rekopub_windows_amd64.zip</a></td></tr>
  85. <tr><td>Windows on Arm</td><td><a href="/download/rekopub_windows_arm64.zip">rekopub_windows_arm64.zip</a></td></tr>
  86. <tr><td>Mac with Apple silicon</td><td><a href="/download/rekopub_darwin_arm64.tar.gz">rekopub_darwin_arm64.tar.gz</a></td></tr>
  87. <tr><td>Mac with Intel</td><td><a href="/download/rekopub_darwin_amd64.tar.gz">rekopub_darwin_amd64.tar.gz</a></td></tr>
  88. <tr><td>Linux (x86-64)</td><td><a href="/download/rekopub_linux_amd64.tar.gz">rekopub_linux_amd64.tar.gz</a></td></tr>
  89. <tr><td>Linux (Arm)</td><td><a href="/download/rekopub_linux_arm64.tar.gz">rekopub_linux_arm64.tar.gz</a></td></tr>
  90. </tbody>
  91. </table>
  92. <p class="small"><a href="/download/checksums.txt">checksums.txt</a> lists the SHA-256 of each file.</p>
  93. </div>
  94. <p>
  95. Unpack the archive and put <code>rekopub</code> (<code>rekopub.exe</code>
  96. on Windows) somewhere convenient. It's a command-line program, so run it
  97. from Terminal, Command Prompt or PowerShell rather than by double-clicking.
  98. The binaries aren't code-signed, so the first run may show a warning:
  99. </p>
  100. <ul>
  101. <li><strong>Windows:</strong> SmartScreen may say "Windows protected your PC". Choose <em>More info &rarr; Run anyway</em>.</li>
  102. <li><strong>macOS:</strong> Gatekeeper may refuse to open it. Run this once, in the folder where you unpacked it:
  103. <pre><code>xattr -d com.apple.quarantine rekopub</code></pre></li>
  104. </ul>
  105. <p>With Go 1.26 or newer you can also build it yourself:</p>
  106. <pre><code>go install git.monoexp.com/bajdev/rekopub/cmd/rekopub@latest</code></pre>
  107. </section>
  108. <section id="usage" aria-labelledby="usage-title">
  109. <h2 id="usage-title">Usage</h2>
  110. <pre><code>rekopub -URL &lt;url&gt; -SAVE &lt;path&gt; [-FORCE] [-KEPUB]
  111. rekopub -VERSION</code></pre>
  112. <div class="table-scroll">
  113. <table>
  114. <thead>
  115. <tr><th scope="col">Flag</th><th scope="col">What it does</th></tr>
  116. </thead>
  117. <tbody>
  118. <tr><td><code>-URL</code></td><td>The web page to convert. Must start with <code>http://</code> or <code>https://</code>. Required.</td></tr>
  119. <tr><td><code>-SAVE</code></td><td>Where to write the book: a file or a folder. Missing folders are created. Required.</td></tr>
  120. <tr><td><code>-FORCE</code></td><td>Overwrite the output file if it already exists.</td></tr>
  121. <tr><td><code>-KEPUB</code></td><td>Write a Kobo KEPUB (<code>.kepub.epub</code>) instead of a plain EPUB.</td></tr>
  122. <tr><td><code>-VERSION</code></td><td>Print the version and exit.</td></tr>
  123. </tbody>
  124. </table>
  125. </div>
  126. <p>Flag names are case-sensitive: <code>-URL</code> works, <code>-url</code> does not.</p>
  127. <h3>Where the book is saved</h3>
  128. <ul>
  129. <li><strong>A folder</strong>, such as <code>~/Books/</code> or an existing <code>~/Books</code>: the file name comes from the article title.</li>
  130. <li><strong>A path ending in <code>.epub</code></strong>: written to exactly that file.</li>
  131. <li><strong>Anything else</strong>, such as <code>~/Books/a</code>: treated as a file name, with <code>.epub</code> added.</li>
  132. </ul>
  133. <p>
  134. Watch the trailing slash when the folder doesn't exist yet:
  135. <code>-SAVE ~/Books/new/</code> creates a folder called <code>new</code>,
  136. while <code>-SAVE ~/Books/new</code> writes <code>new.epub</code>.
  137. On success, the saved file's full path is printed, so it's easy to use in scripts.
  138. </p>
  139. <h3>Kobo Clara HD</h3>
  140. <p>Use <code>-KEPUB</code> for faster page turns and reading stats. Connect the Kobo by USB, tap <em>Connect</em>, and save straight to it:</p>
  141. <pre><code># Linux
  142. rekopub -URL https://example.com/article -SAVE /media/$USER/KOBOeReader/Articles/ -KEPUB
  143. # macOS
  144. rekopub -URL https://example.com/article -SAVE /Volumes/KOBOeReader/Articles/ -KEPUB
  145. # Windows (the drive letter may differ)
  146. rekopub.exe -URL https://example.com/article -SAVE E:\Articles\ -KEPUB</code></pre>
  147. <p>Eject the Kobo and the article appears in your library.</p>
  148. <h3>reMarkable 2</h3>
  149. <p>Use a plain EPUB, without <code>-KEPUB</code>. Save it on your computer:</p>
  150. <pre><code>rekopub -URL https://example.com/article -SAVE ~/reMarkable/</code></pre>
  151. <p>
  152. Then drag the file into the reMarkable desktop or mobile app, or upload it
  153. through the USB web interface (<em>Settings &rarr; Storage &rarr; USB web
  154. interface</em>, then open <code>http://10.11.99.1</code>).
  155. </p>
  156. <h3>Good to know</h3>
  157. <ul>
  158. <li>Pages that build their content with JavaScript, paywalls and cookie walls can't be converted.</li>
  159. <li>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.</li>
  160. <li>It sends no cookies, never logs in and runs no JavaScript. Every book records its source URL.</li>
  161. </ul>
  162. <p>
  163. The <a href="https://git.monoexp.com/bajdev/ReKoPub#readme">README</a> has
  164. the full details: exit codes, troubleshooting and privacy.
  165. </p>
  166. </section>
  167. <section id="license" aria-labelledby="license-title">
  168. <h2 id="license-title">License</h2>
  169. <p>
  170. ReKoPub is free software, released under the
  171. <a href="https://git.monoexp.com/bajdev/ReKoPub/src/main/LICENSE">MIT License</a>.
  172. Copyright &copy; 2026 bajdev.
  173. </p>
  174. <p>It builds on these open-source Go libraries:</p>
  175. <div class="table-scroll">
  176. <table class="libraries">
  177. <thead>
  178. <tr><th scope="col">Library</th><th scope="col">Used for</th><th scope="col">License</th></tr>
  179. </thead>
  180. <tbody>
  181. <tr><td><a href="https://github.com/markusmobius/go-trafilatura">go-trafilatura</a></td><td>Article and metadata extraction</td><td>Apache-2.0</td></tr>
  182. <tr><td><a href="https://github.com/go-shiori/go-epub">go-epub</a></td><td>EPUB packaging</td><td>MIT</td></tr>
  183. <tr><td><a href="https://github.com/pgaskin/kepubify">kepubify</a></td><td>KEPUB conversion</td><td>MIT</td></tr>
  184. <tr><td><a href="https://github.com/microcosm-cc/bluemonday">bluemonday</a></td><td>HTML sanitising</td><td>BSD-3-Clause</td></tr>
  185. <tr><td><a href="https://github.com/srwiley/oksvg">oksvg</a> and <a href="https://github.com/srwiley/rasterx">rasterx</a></td><td>SVG rendering</td><td>BSD-3-Clause</td></tr>
  186. <tr><td><a href="https://github.com/vincent-petithory/dataurl">dataurl</a></td><td>Images embedded in pages</td><td>MIT</td></tr>
  187. <tr><td><a href="https://github.com/google/uuid">uuid</a></td><td>Book identifiers</td><td>BSD-3-Clause</td></tr>
  188. <tr><td><a href="https://pkg.go.dev/golang.org/x/image">x/image</a>, <a href="https://pkg.go.dev/golang.org/x/net">x/net</a>, <a href="https://pkg.go.dev/golang.org/x/text">x/text</a>, <a href="https://pkg.go.dev/golang.org/x/sync">x/sync</a></td><td>WebP decoding, image scaling, cover fonts, HTML parsing, character sets</td><td>BSD-3-Clause</td></tr>
  189. </tbody>
  190. </table>
  191. </div>
  192. </section>
  193. </main>
  194. <footer class="site-footer">
  195. <div class="wrap">
  196. <p>A <a href="https://monoexp.com/">Mono Experiments</a> project &middot; <a href="https://git.monoexp.com/bajdev/ReKoPub">Source</a></p>
  197. </div>
  198. </footer>
  199. </body>
  200. </html>