sc2epub

convert sourcecode to epub

install

$ gem install sc2epub

usage

$ sc2epub SOURCECODE_DIRECTORY OUTPUT_DIRECTORY PROJECT_NAME
$ cd OUTPUT_DIRECTORY
$ make
# it generates PROJECT_NAME.epub
$ make kindle # if you need mobi file
# it generates PROJECT_NAME.mobi

example

$ sc2epub ~/src/readline-5.2 ~/src/readline-epub readline
$ cd ~/src/readline-epub
$ make
$ make kindle
$ cp readline.mobi ~/

notice

sc2epub generates xhtml, xml, and Makefile. You need ‘make’ command for compilation of epub. And if you want to generate mobi file, you need ‘kindlegen’ command. About kindlegen see below. www.amazon.com/gp/feature.html?ie=UTF8&docId=1000234621