View arbitrary source code trees in Kindle
Switch branches/tags
Nothing to show
Pull request Compare This branch is 77 commits behind agentzh:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Want to browse big source code trees in your Kindle?

This project provides utilities to help generating .mobi ebook files
directly from arbitrary source trees.

The script can generate an HTML tree from the source tree that you specify, for example:

    export PATH=/path/to/src2kindle:$PATH /path/to/my/src/tree/ 'Your Book Title'

And then you can generate a mobi file using Calibre
( ):

    ebook-convert /path/to/my/src/tree/index.html \
    --output-profile kindle_dx --no-inline-toc \
    --title "Your Book Title" --publisher 'Your Name' \
    --language en --authors 'Your Author Name'

Maybe you could take a coffee break :)

Note: On OS X you have to go to Preferences->Advanced->Miscellaneous and click install command line tools to make the command line tools available after  you installed the app. On other platforms, just start a terminal and type the command.

Here we use the value "kindle_dx" for the --output-profile option
assuming that we want to view the ebook in Kindle DX. You
should use "kindle" for other (smaller) models of Kindle.

The ebook-convert utility is provided by Calibre, see its online
documentation for full usage:

Well you need both perl and python ;)

Currently only the following files will be searched by according to their file extensions:

    .c .cpp .h
    .tt .js .pl .php .t .pod .xml .conf .pm6
    .lzsql .lzapi .grammar .lua .java .sql

You can edit the related regex in the Perl source of the
to add or remove extensions that it will recognize.