Skip to content

Instantly share code, notes, and snippets.

@peregrinogris
Created August 18, 2016 14:04
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peregrinogris/33ffd46f0bf37847b36aefcffe0c09fb to your computer and use it in GitHub Desktop.
Save peregrinogris/33ffd46f0bf37847b36aefcffe0c09fb to your computer and use it in GitHub Desktop.
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