Collaborative Open Source Books with pyBookBuilder
Remember when I talked about open source books and the Open College Textbook Act of 2009? Well, not much happened, apparently. The bill was "Read twice and referred to the Committee on Health, Education, Labor, and Pensions" more than a year ago. So yeah, that's that.
But wait! There is good news! Some people have gotten together and have started the Open Book Project, an online project for electronic open source books. However, they have a problem. It turns out that authoring books in a collaborative manner is troublesome. Books (especially electronic ones) are complex things, with crosslinking, special formatting, plus things like LaTeX, images, etc. There just was no simple way to co-author books! Introducing...
pyBookBuilder
pyBookBuilder is a new project I've started to solve this problem! Its functionality is composing books using a simple reStructuredText syntax for marking up text in books, then compiling it into neat HTML books using the Sphinx Python documentation tool.
So, what are some of its features?
Intuitive and Simple Interface
Editing a book (which is basically just a collection of plaintext files) should not be hard. It isn't. There is simple access to all chapters and the index page, and easy editing of them.
Easy Sphinx Compilation
No messing around with configuration files, no needing to concern yourself with the directory structure, and no concern for Sphinx not having the right working directory, or the right command to run it on your program. You click "Compile" and it Just Works™.
LaTeX Math Support via MathJax
MathJax uses Javascript to render LaTeX math code into pretty HTML. pyBookBuilder supports this without any hassle, just via the math directive. For example:
.. math ::
x = \frac{-b\pm\sqrt{b^2-4ac}}{2a}
Neatly renders into something looking like this:
Except, you know, text, not an image.
Coming Soon: Version Control
I am actually blogging about this since I am going to be showing off pyBookBuilder at PyCon 2011, which has now started in Atlanta. I will be there at the poster session on Saturday, with the pyBookBuilder poster. The reason of my being there? pyBookBuilder will be developed on during the sprints at PyCon!
The objective for the development sprint on pyBookBuilder is to get version control of the book chapters, configurations, and uploads. If you're at PyCon too, feel free to drop by and lend a hand, or even to just say hi!
Edit: I will apparently not be adding version control to pyBookBuilder here at PyCon. Instead, pyBookBuilder will be rewritten/refactored to use Pyramid instead of web2py, for the scalability and extra reliability that Pyramid grants.
For those curious, there is an instance of pyBookBuilder running live at http://books.opensourcenerd.com. Feel free to try it out, but please do not actually edit any books except for the "Test Book of Testiness." The content in the other books is not test content, so please be respectful.