Andy Lindeman just open-sourced his book ‘Upgrading to Rails 4’ on Github.
To download and compile epub:
git clone https://github.com/alindeman/upgradingtorails4.git
bundle exec kitabu export
Make also sure, to have pygments installed for syntax highlighting:
sudo apt-get install python-pygments
Additionally, to also generate pdfs, install Prince XML before running kitabu. Here the example for generic linux 32bit (All packages can be found on on their website)
# 32bit linux
sudo wget http://www.princexml.com/download/prince-9.0r2-linux-static.tar.gz
sudo tar xf prince-9.0r2-linux-static.tar.gz
sudo bash install.sh
Now, epub html and txt files are in the output folder.