Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/philschatz/pdf-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
philschatz committed Oct 20, 2013
2 parents 1d19ace + 8f615a3 commit b833931
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,31 @@
# 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](http://pdf.oerpub.org) 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:

1. http://github.com/philschatz/minimal-book
2. Repositories in the [oerpub organization](https://github.com/oerpub) that end in "-book"

Add a GitHub Service Hook to generate PDFs on Commit:

1. Go to https://github.com/REPO_USER/REPO_NAME/settings/hooks (be sure to replace `REPO_USER` and `REPO_NAME` with appropriate names for your book repository)
2. Click "WebHook URLs"
3. Enter http://pdf.oerpub.org as the URL
4. Click "Update Settings"
5. Click "Test Hook"

# Ooh, let me see!

To download the dependencies
To download the dependencies:

npm install .

Expand All @@ -13,15 +34,17 @@ Install your favorite HTML to PDF tool. Some examples:
- [wkhtmltopdf](https://code.google.com/p/wkhtmltopdf/)
- [princexml](http://princexml.com)

And, to start it up (all one line)
Install http://www.mongodb.org/downloads

node bin/server.js --pdfgen ${PATH_TO_PDFGEN_BINARY}
And, to start it up:

Then, point your browser to the website at [http://localhost:3001/]()
mongod &
node bin/server.js &
node bin/slave.js --pdfgen ${PATH_TO_PDFGEN_BINARY}

## Ok, so what now?
Then, point your browser to the website at [http://localhost:3001](http://localhost:3001)

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

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

Expand All @@ -40,3 +63,4 @@ Submit a job by going to [http://localhost:3001/philschatz/minimal-book/]() and
- `[X]` store PDFs on file system
- `[X]` store tasks in database (MongoDB)
- `[X]` create slave task
- `[ ]` support Build History

0 comments on commit b833931

Please sign in to comment.