This is the simple tool to generate e-book for Amazon Kindle (in .mobi format) from git repository tree.
This tool depends on kindlegen and source-highlight. You need to download kindlegen binary from Amazon.com site. As for source-highlight you can install it using your package manager, for example in Debian:
apt-get install source-highlight
Next you need to install script itself. Assuming you have $HOME/bin
in your PATH:
curl https://raw.github.com/avsej/git-kindle/master/git-kindle > $HOME/bin/git-kindle
chmod a+x $HOME/bin/git-kindle
Go to your repository directory (e.g. myproj) and run
git kindle
It will search C files by default and create myproj.mobi file in current directory. You can also specify custom regexp for file filter:
git kindle '\.rb$'