# link2epub-rs > 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. CLI to download articles and convert them to `.epub`/`.mobi` files. It gets the text content, simplifies its html, downloads the images, and builds the `.epub`/`.mobi` file. AVIF article images are converted to PNG for compatibility with ebook readers. Most AVIF images are decoded directly in Rust. Bitstreams not yet supported by the Rust decoder require `avifdec` from `libavif` on `PATH` (`nix shell nixpkgs#libavif`). The motivation is to read web articles offline in your e-reader. ## Usage Build with the current stable Rust toolchain: ```sh cargo build --release ``` Place the binary in the `~/bin` directory for a comfortable usage from anywhere. ```sh link2epub 'https://link.com/to-the-article' # optionally add extension (by default .epub) link2epub 'https://link.com/to-the-article' -t mobi # see help for all the available flags link2epub --help ``` mobi generation requires [Calibre's ebook-convert](https://calibre-ebook.com/) command on `PATH`. epub generation has no external runtime dependencies.