Created
March 23, 2017 14:37
-
-
Save eduard-sukharev/8706d999f629b9801c5e3a3791bb725d to your computer and use it in GitHub Desktop.
Convert Markdown book sources to Epub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Be sure to remove top level book titles from the beginning of each chapter' file, otherwise | |
# you'll get blank page with book title and chapter subtitle before each chapter | |
# Plain markdown allows html tags inclusion for images. | |
pandoc -o mybook.epub -f markdown -t epub -s --toc --toc-depth=2 ch1.md ch2.md ch3.md metadata.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: | |
- type: main | |
text: Book series title | |
- type: subtitle | |
text: Specific Book title | |
creator: | |
- role: author | |
text: John Smith | |
identifier: | |
- scheme: ISBN-10 | |
text: 1-2345-6789-0 | |
publisher: Oh'Realy Media | |
rights: © Creative Commons | |
cover-image: cover.jpg | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment