Giter VIP home page Giter VIP logo

sphinx-mobi's Introduction

sphinx-mobi

Patch Sphinx code to enable kindle/mobi support.

Requirements

I assume that you'll be able to download Sphinx-1.1.3 release as well as install on your system kindlegen. The former is provided here, while later can be found on Amazon Kindle support page.

Description

This is a fork for Sphinx 1.1.3 code with changes to enable support for Kindle (mobi data format). Basically I copied epub, tweak themes, core code and add mobi option into sphinx-quickstart.

Install

To install, please get sphinx-1.1.3.mobi.patch and patch your vanila Sphinx-1.1.3 code base with the following command:

cd Sphinx-1.1.3
patch -p1 < sphinx-1.1.3.mobi.patch
cp sphinx/themes/basic/static/file.png sphinx/themes/mobi/static/file.png
cp kindle-logo.jpg sphinx/themes/mobi/static/

Then build and install your Sphinx in a usual way

python setup.py install --prefix=<your_install_path>

Build your mobi

Once everything in place, run sphinx-quickstart in a usual way, and answer y to the following questions:

  • Do you want to use the kindle/mobi builder (y/N) [n]: y
  • pngmath: include math, rendered as PNG images (y/N) [n]: y

The former enable mobi option in generated Makefile, while later allows you to embed LaTeX formulas into your mobi book.

Example

You can find the source code as well as generated kindle.mobi file in example directory.

Future

Once time permit I'll look further in customization of mobi builder in sphinx code. Upon that time, I'm happy with this preliminary hack.

References

Most of this work was inspired and based on materials presented in this blog.

sphinx-mobi's People

Contributors

vkuznet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.