index.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  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="convert" aria-labelledby="convert-title">
  43. <h2 id="convert-title">Convert an article</h2>
  44. <div class="convert">
  45. <!-- Sent to rekopub-web (cmd/rekopub-web), which runs the rekopub
  46. command on the server. convert.js shows the result on this page;
  47. without JavaScript the server answers with a page of its own. -->
  48. <form id="convert-form" action="/api/convert" method="post">
  49. <fieldset id="convert-fields">
  50. <label for="convert-url">Article address</label>
  51. <div class="convert-row">
  52. <input id="convert-url" name="url" type="url" required maxlength="2000"
  53. placeholder="https://example.com/some-article" autocomplete="url" spellcheck="false">
  54. <button type="submit">Convert</button>
  55. </div>
  56. <fieldset class="formats">
  57. <legend>Format</legend>
  58. <label><input type="radio" name="format" value="epub" checked> EPUB <span>reMarkable and most readers</span></label>
  59. <label><input type="radio" name="format" value="kepub"> KEPUB <span>Kobo</span></label>
  60. <label><input type="radio" name="format" value="both"> Both</label>
  61. </fieldset>
  62. </fieldset>
  63. </form>
  64. <div id="convert-result" class="convert-result" role="status" aria-live="polite"></div>
  65. <p class="small">
  66. This server downloads the page and makes the book for you, with the
  67. same rules as the command-line tool. Books are deleted after
  68. <span id="keep-hours">24</span> hours. It's shared by everyone, so
  69. conversions are limited and may be paused for a while when it's busy.
  70. </p>
  71. </div>
  72. </section>
  73. <section id="features" aria-labelledby="features-title">
  74. <h2 id="features-title">Features</h2>
  75. <ul class="cards">
  76. <li class="card">
  77. <h3>Readable content only</h3>
  78. <p>Finds the main article text. Menus, ads, cookie banners, share buttons and comments are left out.</p>
  79. </li>
  80. <li class="card">
  81. <h3>Tuned for e-ink</h3>
  82. <p>Images become grayscale and fit the screen, diagrams stay crisp, and fonts and margins are left to your reader.</p>
  83. </li>
  84. <li class="card">
  85. <h3>Works offline</h3>
  86. <p>Images are embedded in the book. Title, author, date and language are filled in, and every book gets a cover.</p>
  87. </li>
  88. <li class="card">
  89. <h3>Kobo-optimised</h3>
  90. <p><code>-KEPUB</code> writes a <code>.kepub.epub</code>, which Kobo opens with its faster renderer and reading stats.</p>
  91. </li>
  92. <li class="card">
  93. <h3>Safe saving</h3>
  94. <p>Never overwrites a file unless you pass <code>-FORCE</code>, and never leaves a half-written book behind.</p>
  95. </li>
  96. <li class="card">
  97. <h3>Single binary</h3>
  98. <p>No runtime dependencies. One file for Linux, macOS or Windows; nothing to install.</p>
  99. </li>
  100. </ul>
  101. </section>
  102. <section id="get" class="group" aria-labelledby="get-title">
  103. <h2 id="get-title" class="section-title">Download / Use ReKoPub</h2>
  104. <section id="download" aria-labelledby="download-title">
  105. <h3 id="download-title" class="label">Download</h3>
  106. <div class="release">
  107. <p class="release-version">
  108. <strong>@VERSION@</strong>
  109. <span>built @DATE@ from commit
  110. <a href="https://git.monoexp.com/bajdev/ReKoPub/commit/@COMMIT@"><code>@SHORT@</code></a></span>
  111. </p>
  112. <table class="downloads">
  113. <thead>
  114. <tr><th scope="col">Computer</th><th scope="col">File</th></tr>
  115. </thead>
  116. <tbody>
  117. <tr><td>Windows (most PCs)</td><td><a href="/download/rekopub_windows_amd64.zip">rekopub_windows_amd64.zip</a></td></tr>
  118. <tr><td>Windows on Arm</td><td><a href="/download/rekopub_windows_arm64.zip">rekopub_windows_arm64.zip</a></td></tr>
  119. <tr><td>Mac with Apple silicon</td><td><a href="/download/rekopub_darwin_arm64.tar.gz">rekopub_darwin_arm64.tar.gz</a></td></tr>
  120. <tr><td>Mac with Intel</td><td><a href="/download/rekopub_darwin_amd64.tar.gz">rekopub_darwin_amd64.tar.gz</a></td></tr>
  121. <tr><td>Linux (x86-64)</td><td><a href="/download/rekopub_linux_amd64.tar.gz">rekopub_linux_amd64.tar.gz</a></td></tr>
  122. <tr><td>Linux (Arm)</td><td><a href="/download/rekopub_linux_arm64.tar.gz">rekopub_linux_arm64.tar.gz</a></td></tr>
  123. </tbody>
  124. </table>
  125. <p class="small"><a href="/download/checksums.txt">checksums.txt</a> lists the SHA-256 of each file.</p>
  126. </div>
  127. <p>
  128. Unpack the archive and put <code>rekopub</code> (<code>rekopub.exe</code>
  129. on Windows) somewhere convenient. It's a command-line program, so run it
  130. from Terminal, Command Prompt or PowerShell rather than by double-clicking.
  131. The binaries aren't code-signed, so the first run may show a warning:
  132. </p>
  133. <ul>
  134. <li><strong>Windows:</strong> SmartScreen may say "Windows protected your PC". Choose <em>More info &rarr; Run anyway</em>.</li>
  135. <li><strong>macOS:</strong> Gatekeeper may refuse to open it. Run this once, in the folder where you unpacked it:
  136. <pre><code>xattr -d com.apple.quarantine rekopub</code></pre></li>
  137. </ul>
  138. <p>With Go 1.26 or newer you can also build it yourself:</p>
  139. <pre><code>go install git.monoexp.com/bajdev/rekopub/cmd/rekopub@latest</code></pre>
  140. </section>
  141. <section id="usage" aria-labelledby="usage-title">
  142. <h3 id="usage-title" class="label">Usage</h3>
  143. <pre><code>rekopub -URL &lt;url&gt; -SAVE &lt;path&gt; [-FORCE] [-KEPUB]
  144. rekopub -VERSION</code></pre>
  145. <div class="table-scroll">
  146. <table>
  147. <thead>
  148. <tr><th scope="col">Flag</th><th scope="col">What it does</th></tr>
  149. </thead>
  150. <tbody>
  151. <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>
  152. <tr><td><code>-SAVE</code></td><td>Where to write the book: a file or a folder. Missing folders are created. Required.</td></tr>
  153. <tr><td><code>-FORCE</code></td><td>Overwrite the output file if it already exists.</td></tr>
  154. <tr><td><code>-KEPUB</code></td><td>Write a Kobo KEPUB (<code>.kepub.epub</code>) instead of a plain EPUB.</td></tr>
  155. <tr><td><code>-VERSION</code></td><td>Print the version and exit.</td></tr>
  156. </tbody>
  157. </table>
  158. </div>
  159. <p>Flag names are case-sensitive: <code>-URL</code> works, <code>-url</code> does not.</p>
  160. <h4>Where the book is saved</h4>
  161. <ul>
  162. <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>
  163. <li><strong>A path ending in <code>.epub</code></strong>: written to exactly that file.</li>
  164. <li><strong>Anything else</strong>, such as <code>~/Books/a</code>: treated as a file name, with <code>.epub</code> added.</li>
  165. </ul>
  166. <p>
  167. Watch the trailing slash when the folder doesn't exist yet:
  168. <code>-SAVE ~/Books/new/</code> creates a folder called <code>new</code>,
  169. while <code>-SAVE ~/Books/new</code> writes <code>new.epub</code>.
  170. On success, the saved file's full path is printed, so it's easy to use in scripts.
  171. </p>
  172. <h4>Kobo Clara HD</h4>
  173. <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>
  174. <pre><code># Linux
  175. rekopub -URL https://example.com/article -SAVE /media/$USER/KOBOeReader/Articles/ -KEPUB
  176. # macOS
  177. rekopub -URL https://example.com/article -SAVE /Volumes/KOBOeReader/Articles/ -KEPUB
  178. # Windows (the drive letter may differ)
  179. rekopub.exe -URL https://example.com/article -SAVE E:\Articles\ -KEPUB</code></pre>
  180. <p>Eject the Kobo and the article appears in your library.</p>
  181. <h4>reMarkable 2</h4>
  182. <p>Use a plain EPUB, without <code>-KEPUB</code>. Save it on your computer:</p>
  183. <pre><code>rekopub -URL https://example.com/article -SAVE ~/reMarkable/</code></pre>
  184. <p>
  185. Then drag the file into the reMarkable desktop or mobile app, or upload it
  186. through the USB web interface (<em>Settings &rarr; Storage &rarr; USB web
  187. interface</em>, then open <code>http://10.11.99.1</code>).
  188. </p>
  189. <h4>Good to know</h4>
  190. <ul>
  191. <li>Pages that build their content with JavaScript, paywalls and cookie walls can't be converted.</li>
  192. <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>
  193. <li>It sends no cookies, never logs in and runs no JavaScript. Every book records its source URL.</li>
  194. </ul>
  195. <p>
  196. The <a href="https://git.monoexp.com/bajdev/ReKoPub#readme">README</a> has
  197. the full details: exit codes, troubleshooting and privacy.
  198. </p>
  199. </section>
  200. </section>
  201. <section id="license" aria-labelledby="license-title">
  202. <h2 id="license-title">License</h2>
  203. <p>
  204. ReKoPub is free software, released under the
  205. <a href="https://git.monoexp.com/bajdev/ReKoPub/src/main/LICENSE">MIT License</a>.
  206. Copyright &copy; 2026 bajdev.
  207. </p>
  208. <p>It builds on these open-source Go libraries:</p>
  209. <div class="table-scroll">
  210. <table class="libraries">
  211. <thead>
  212. <tr><th scope="col">Library</th><th scope="col">Used for</th><th scope="col">License</th></tr>
  213. </thead>
  214. <tbody>
  215. <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>
  216. <tr><td><a href="https://github.com/go-shiori/go-epub">go-epub</a></td><td>EPUB packaging</td><td>MIT</td></tr>
  217. <tr><td><a href="https://github.com/pgaskin/kepubify">kepubify</a></td><td>KEPUB conversion</td><td>MIT</td></tr>
  218. <tr><td><a href="https://github.com/microcosm-cc/bluemonday">bluemonday</a></td><td>HTML sanitising</td><td>BSD-3-Clause</td></tr>
  219. <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>
  220. <tr><td><a href="https://github.com/vincent-petithory/dataurl">dataurl</a></td><td>Images embedded in pages</td><td>MIT</td></tr>
  221. <tr><td><a href="https://github.com/google/uuid">uuid</a></td><td>Book identifiers</td><td>BSD-3-Clause</td></tr>
  222. <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>
  223. </tbody>
  224. </table>
  225. </div>
  226. </section>
  227. </main>
  228. <footer class="site-footer">
  229. <div class="wrap">
  230. <p>A <a href="https://monoexp.com/">Mono Experiments</a> project &middot; <a href="https://git.monoexp.com/bajdev/ReKoPub">Source</a></p>
  231. </div>
  232. </footer>
  233. <script src="/convert.js" defer></script>
  234. </body>
  235. </html>