Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



50 Commits

Repository files navigation

What is this?

Generate PDF from an EPUB repository as a Commit Hook! Whenever your book in GitHub changes, the PDF will automatically regenerate.

OK, so what now?

Check out the demo website to see this code in action. You can see recently built PDFs and trigger new ones to be generated.

Make my Book!

You will need to have a repository that is an unzipped EPUB. Some examples are:

  2. Repositories in the oerpub organization that end in "-book"

Add a GitHub Service Hook to generate PDFs on Commit:

  1. Go to (be sure to replace REPO_USER and REPO_NAME with appropriate names for your book repository)
  2. Click "WebHook URLs"
  3. Enter as the URL
  4. Click "Update Settings"
  5. Click "Test Hook"

Ooh, let me see!

To download the dependencies:

npm install .

Install your favorite HTML to PDF tool. Some examples:


And, to start it up:

mongod &
node bin/server.js &
node bin/slave.js --pdfgen ${PATH_TO_PDFGEN_BINARY}

Then, point your browser to the website at http://localhost:3001

Submit a job by going to http://localhost:3001/philschatz/minimal-book/ and clicking the "Rebuild" button.

Cool! How can I help out? (TODO list)

  • [X] Trigger from a GET/POST
  • [X] Concatenate all the HTML files
  • [X] Generate a PDF
  • [X] GET the PDF via a URL
  • [X] Store multiple promises in memory
  • [X] Store console output and progress
  • [X] Show status webpage
  • [X] read EPUB files (META-INF/container.xml, OPF file, ToC HTML)
  • [X] run git clone or git pull from command line
  • [X] write POST route for GitHub Service Hooks
  • [X] distinguish commit from branch or other hooks
  • [X] add a Status Image to include in GitHub README
  • [X] store PDFs on file system
  • [X] store tasks in database (MongoDB)
  • [X] create slave task
  • [ ] support Build History