Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Build a leanpub book source to epub, using pandoc
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