Created
August 18, 2016 14:04
-
-
Save peregrinogris/33ffd46f0bf37847b36aefcffe0c09fb to your computer and use it in GitHub Desktop.
Build a leanpub book source to epub, using pandoc
This file contains hidden or 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
with open("Book.txt") as f: | |
print ('echo "Starting build of {book}.epub";' | |
"pandoc {files} " + | |
"--smart --table-of-contents --chapters -o {book}.epub;" | |
'echo " {book}.epub created."' | |
).format(book="Book", files=f.read().replace("\n", " ")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment