rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.86k stars 12.67k forks source link

doc: provide epub download of The Book #20866

Closed akavel closed 11 months ago

akavel commented 9 years ago

Could you possibly add an .epub version of The Book for download on the website?

The epub format seems at least mentioned in some Makefiles, so I hope this should be not very hard -- unless it's defunct and unsupported, and would have to be done from scratch? If not, then still there are some tools like pandoc, that I think support making epubs from Markdown already, so at least should be doable without reinventing the tools...

I'd be very grateful, thanks.

anzbert commented 2 years ago

thx @CeresCa . I've used that extension to create create an epub for the latest book version The_Rust_Programming_Language_1.59.epub.zip

miguno commented 1 year ago

@peterbartha's instructions (https://gist.github.com/peterbartha/54708ae739478a45b52612311d49717c) worked for me. Thanks!

lapwat commented 1 year ago

You can easily create the ebook yourself with papeer. It keeps content, text formatting, images and code blocks.

Install it with: go install github.com/lapwat/papeer@latest

Use the CSS selector ol>li>a to select all table of content items. Specify epub format.

papeer get --selector='ol>li>a' --format=epub https://doc.rust-lang.org/book/
# [===========>] The Rust Programming Language - The Rust Programming Language (104 / 104)
# Ebook saved to "The_Rust_Programming_Language_-_The_Rust_Programming_Language.epub"

The_Rust_ProgrammingLanguage-_The_Rust_Programming_Language.epub.zip

ivanglushko commented 1 year ago

Here's a pdf print from the site - And I manually added table of contents there.

The Rust Programming Language.pdf

vitali2y commented 1 year ago

Here's a pdf print from the site - And I manually added table of contents there.

Cool. How about .epub as on title on the top?

impredicative commented 1 year ago

Here's a pdf print from the site - And I manually added table of contents there.

The Rust Programming Language.pdf

How does one go about finding such a link for a future version?

shirshak55 commented 1 year ago

@impredicative if you are seeking pdf then you can find it here. Updated daily. https://github.com/shirshak55/Rust-Book-In-PDF/releases

hustcer commented 1 year ago

@shirshak55 Wow, super cool, It would be better if there were a epub version

ivanglushko commented 1 year ago

How does one go about finding such a link for a future version?

I don't plan on keeping this up to date sorry. Maybe it's possible to write a script that will link all the chapters in pdf but I didn't find a fast solution. So had to do it manually.

dralley commented 1 year ago

This is a duplicate of https://github.com/rust-lang/book/issues/3669 - in any case, book related issues should be filed over there.

Dylan-DPC commented 11 months ago

Closing this as the book issue already covers this

dieterplex commented 8 months ago

Like shirshak55's daily PDF https://github.com/shirshak55/Rust-Book-In-PDF/releases, here's my daily ePub https://dieterplex.github.io/rust-ebookshelf/ in case someone is still interested.