Create an ePubcheck script on Mac

Quick note on creating a Unix bash script to execute ePubcheck on Mac. Modify the path as will, here we’ll use the /Download folder.

  • Download the latest stable ePbubcheck release on Github.
  • Unzip on ~/Downloads/Epubcheck/
  • Create a script in ~/Downloads/ePubcheck.command. The extension will allow you to execute it by double clicking, once made executable.
#!/bin/bash
for epub in ~/Downloads/*.epub
do
    java -jar ~/Downloads/Epubcheck/epubcheck-3.0.1.jar $epub
done
  • Make the file executable
$ sudo chmod +x ~/Downloads/ePubcheck.command
  • Place any *.epub files in your Download folder
  • Execute your script

Of course don’t hesitate to enhance it to fit your goals.

Advertisements

Comments are closed.

Blog at WordPress.com.

Up ↑