Coder Social home page Coder Social logo

python-documentation-kindle's Introduction

This project lets you download a Kindle-optimized version of the Python documentation. You can also create your own ebook for any project using Sphinx to generate its documentation.

Download

Python.mobi (Python 3.2.2, generated: 09/25/2011)

You can also clone the project with Git by running:

$ git clone git://github.com/charlax/Python-Documentation-Kindle

Kindle Python Documentation book

Generate your own ebook

You can also generate a Kindle-optimized file for any other version of Python.

Requirements

The project must use Sphinx (this is the case for Python).

You also need to install Amazon's KindleGen tool and have it in your path:

$ ln -s ~/bin/kindlegen/kindlegen /usr/local/bin/

Step-by-step tutorial

I tweaked Sphinx a little bit (see modifications below) to make this possible.

$ cd ~/Downloads
$ hg clone https://bitbucket.org/charlax/sphinx
$ wget http://www.python.org/ftp/python/3.2.2/Python-3.2.2.tar.bz2
$ tar xjf Python-3.2.2.tar.bz2
$ cd Python-3.2.2/Doc
$ echo -e "\n# to have the correct first page on Kindle\nepub_pre_files = [('index.html', 'Overview'),]" >> conf.py
$ python ~/Downloads/sphinx/sphinx-build.py -a -b mobi . build/mobi

The MOBI ebook is ~/Downloads/Python-3.2.2/Doc/build/mobi/Python.mobi

Modified version of Sphinx

Context: the Kindle uses a proprietary format .azw. It is based on MOBI, another format designed by Mobipocket. This French company was acquired by Amazon.com in 2005.

I added a MOBI builder to Sphinx, based on the ePub one. Since there are scarce documentation about the MOBI format, I used KindleGen to convert the generated ePub to a MOBI ebook.

Here's what I changed to Sphinx:

  • Added guide section to content.opf (required by Amazon to set the first content shown and the TOC file)
  • Removed @font-face in the CSS (not supported by the MOBI format)
  • Used kindlegen to convert the ePub to MOBI.

Author

Charles-Axel Dein โ€“ www.d3in.org

python-documentation-kindle's People

Contributors

charlax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-documentation-kindle's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.