link2epub-rs/README.md
README.mdRaw
1# link2epub-rs
2
3> This tool was initially implemented in Go at https://github.com/arnaucube/link2epub . This repo is a rust implementation of the same idea, more up to date.
4
5CLI to download articles and convert them to `.epub`/`.mobi` files.
6
7It gets the text content, simplifies its html, downloads the images, and builds the `.epub`/`.mobi` file.
8AVIF article images are converted to PNG for compatibility with ebook readers.
9Most AVIF images are decoded directly in Rust. Bitstreams not yet supported by
10the Rust decoder require `avifdec` from `libavif` on `PATH` (`nix shell nixpkgs#libavif`).
11
12The motivation is to read web articles offline in your e-reader.
13
14
15## Usage
16
17Build with the current stable Rust toolchain:
18
19```sh
20cargo build --release
21```
22
23Place the binary in the `~/bin` directory for a comfortable usage from anywhere.
24
25```sh
26link2epub 'https://link.com/to-the-article'
27
28# optionally add extension (by default .epub)
29link2epub 'https://link.com/to-the-article' -t mobi
30
31# see help for all the available flags
32link2epub --help
33```
34
35mobi generation requires [Calibre's ebook-convert](https://calibre-ebook.com/) command on `PATH`. epub generation has no external runtime dependencies.