name=xxx
## sudo apt-get install ctags
## get `src2html.pl`: https://github.com/agentzh/code2ebook
src2html.pl --color --cross-reference --line-numbers . $name
## sudo apt-get install calibre
ebook-convert html_out/index.html $name.epub \
--output-profile ipad3 \
--no-default-epub-cover \
--output-profile kindle_dx \
--title "$name" --publisher agentzh \
--language en --authors agentzh