index.html 14 KB

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