View Single Post
Old 10-19-2015, 01:55 PM   #22
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by RbnJrg View Post
Very interesting. I had installed Sphinx but I never thought to use it to build an epub. Could you explain me the steps you followed to build the manual? Many thanks in advance.
The manual has a link to the source repository at https://code.launchpad.net/~thinkcsp...thinkcspy3-rle (It uses Launchpad's Bzr VCS, but you can also download the tarball at "Browse the code" --> View Revision (starts at latest) --> Download tarball).

For general elucidation of people:
The manual was written in reStructuredText, which together with Sphinx (which processes *.rst input) is the standard form of Python documentation.
Sphinx comes with a number of builtin "builder" modules to generate documentation output. In addition to html, it also offers htmlhelp (for CHM), LaTeX, txt, texinfo, manpages, xml, and of course EPUB.


This manual also has a default Makefile, so once you have the *.rst source for the manual it is as simple as
Code:
make epub
Or if you don't have Make, you can directly run:
Code:
sphinx-build -d build/doctrees/ -b epub source/ build/epub/

P.S. I un-hid (? ) the ToC and rebuilt the EPUB, much nicer. Again, this is just the default (mostly) source compiled into an EPUB directly via Sphinx.
Attached Files
File Type: epub HowtoThinkLikeaComputerScientistLearningwithPython.epub (1.41 MB, 110 views)

Last edited by eschwartz; 10-19-2015 at 01:57 PM.
eschwartz is offline   Reply With Quote