Skip to content

Instantly share code, notes, and snippets.

@luckylittle
Created May 24, 2022 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save luckylittle/39fa47716d4f47468a89a7934fa72c9a to your computer and use it in GitHub Desktop.
Save luckylittle/39fa47716d4f47468a89a7934fa72c9a to your computer and use it in GitHub Desktop.
Simple workflow to create an EPUB file from the folder and check for EPUB errors
#!/bin/zsh
export EPUB=Lyssa_Adkins_-_Coaching_Agile_Teams
# No compression zip file, with `mimetype` being the first file in the archive
zip -0 -X ${EPUB}.zip mimetype
zip -0 -X -r ${EPUB}.zip META-INF OEBPS
# Rename .zip to .epub
mv -v ${EPUB}.{zip,epub}
# Use EPUBCheck to validate against EPUB rules
java -jar epubcheck-4.2.6/epubcheck.jar ${EPUB}.epub &> ${EPUB}.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment