Skip to content

Latest commit

 

History

History
65 lines (49 loc) · 3.28 KB

Travis-CI.asciidoc

File metadata and controls

65 lines (49 loc) · 3.28 KB

Travis CI and GITenberg

Building Asciidoc after each commit

I started integrating GITenberg with Travis-CI this weekend. Travis-CI is an open source continuous integration server. Typically, a CI server watches for changes on github, then checks out the changed code, runs tests and/or tries to compile the software. Importantly, the hook for a CI server to run is any change being made on Github triggering a 'build' via post_commit hooks. I’ve taken my asciidoc fork of Rime of the Ancient Mariner, told Travis-CI about my repo, and added this Travis config file.

Now, whenever I make a commit to Rime it triggers a build on Travis that looks like this. In this case, I am installing asciidoctor and using it to transform the Rime asciidoc file into html. But I could just as easily build epubs with a slightly different command.

Any files generated by the travis-ci build are automatically uploaded to the amazon file storage cloud. The Rime html is available here.

This is a preliminary result. And more work needs to be done before this is ready for primetime.

Any other format

Asciidoc isn’t the only type of file we can build this way. I’ve taken the bi-lingual book that Tom mentioned, added it to GITenberg, and forked it to my repo: Jesuit Relations. I think the PG html version isn’t as awesome as the raw text version, which has english and french side by side. But I attempted to build the html of Jesuit Relations into an epub with Project Gutenberg’s epubmaker. I have epubmaker and the python requirements installed, but I am having a pathing issue in a bash script that is causing the build to fail.

Conclusion

Nevertheless, this has been an enlightening experiment and I am very hopeful that we can build PG html edition ebooks easily.

This contributes to an overall point I would like to make: I like asciidoc, I think we have the best tools for asciidoc. I want to try everything and compare them. PG has ~400 books in ReStructured Text (a format I have researched thoroughly and consider it second to only Asciidoctor). I would love to auto-build these books as part of the GITenberg infrastructure.

Last few points:

There are currently tradeoffs and limitations to using Travis-ci:

  • the GITenberg organization is too large for Travis to list all of our repos (a common issue, but should be fixable)

  • using travis means including a .travis.yml file in every repo

  • we will have to enable each repo by hand on the travis-ci site (there may be an api for this)

--Seth