Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epub version (How To) #106

Open
bashfulrobot opened this issue Jan 4, 2021 · 4 comments
Open

epub version (How To) #106

bashfulrobot opened this issue Jan 4, 2021 · 4 comments

Comments

@bashfulrobot
Copy link

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

  • Since I am on Ubuntu, I had to update the createBookFromReadme.sh to use the csplit command (search and replace).
  • On Ubuntu I had to search and replace mdBook with mdbook in the script as well.
  • Installed mdbook with cargo install mdbook --version 0.3.7 (the epub requires an older version)
  • installed mdbook-epub with cargo install mdbook-epub
  • Removed the data before "## Introduction" in the README.md due to a missing SVG file.
  • added [output.epub] to the bottom of book.toml
  • ran createBookFromReadme.sh - this results in the web preview having a 404, can ignore, and just ctrl-c to kill the script.
  • The epub should be in the book directory

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

@bashfulrobot bashfulrobot changed the title epub epub version (How To) Jan 4, 2021
@bashfulrobot
Copy link
Author

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

@vitali2y
Copy link

vitali2y commented Jun 2, 2021

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
Copy link
Contributor

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
3. cargo install mdbook
4. 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
Copy link

azzamsa commented Sep 7, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants