Dhghomon / easy_rust

Rust explained using easy English
MIT License
8.08k stars 380 forks source link

epub version (How To) #106

Open bashfulrobot opened 3 years ago

bashfulrobot commented 3 years ago

I am not sure of the best way to approach this (to officially support on your end or not), but I generated an epub for the book using https://github.com/Michael-F-Bryan/mdbook-epub.

Steps

I just wanted to share the process in case any others wanted to add the book to a reader, etc.

bashfulrobot commented 3 years ago

PS, it's not perfect, could use some formatting cleanup, etc, but it is close enough for me (for now).

vitali2y commented 3 years ago

How about to generate epub, fb2 (or bunch of another formats) just in next 3 simple steps?

  1. Open README.md in VSCode / VSCodium (with preliminary installed vscode-markdown-pdf extension),
  2. Right click, then Markdown PDF: Export (html),
  3. F="README" && pandoc $F.html --to=epub --output=$F.epub && ls -l $F.epub from CLI.
dieterplex commented 2 years ago

If you want to using newer mdbook or mdbook-epub,

replace commands

  1. Installed mdbook with cargo install mdbook --version 0.3.7 (the epub requires an older version)
  2. installed mdbook-epub with cargo install mdbook-epub

with

  1. cargo install mdbook
  2. cargo install --version 0.4.15-beta mdbook-epub
  1. added [output.epub] to the bottom of book.toml

With mdbook-epub standalone mode, step 6 is not needed but generate epub after step 7 (run createBookFromReadme.sh) with command

mdbook-epub -s .   # "." indicate the path where `book.toml` located
azzamsa commented 2 years ago

Anyone successfully produced the epub version. Would you like to share the output here?