rust-course icon indicating copy to clipboard operation
rust-course copied to clipboard

Generate epub on Ubuntu.

Open sysescool opened this issue 11 months ago • 0 comments

Install rust:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Init rust env

source ~/.bashrc
cargo install mdbook
cargo install mdbook-epub

The mdbook build-time needs to connect github, I use proxy:

export https_proxy=http://xxxx:xx
export http_proxy=http://xxxx:xx

Then clone

git clone https://github.com/sunface/rust-course.git
cd rust-course

Add below content to the end of book.toml and save it. This will use mdbook-epub as render backend.

[output.epub]

Then run:

RUST_LOG=debug mdbook build

With RUST_LOG=debug, there will be some logs and you can solve the stuck or error.

And the book will gnerate at rust-course/book/epub dir.

sysescool avatar Jan 07 '25 09:01 sysescool