Introduction ------------ This repository contains reStructuredText (reST) source files used to generate the documentation for LeafLabs' libmaple and Maple IDE projects. For more information on these projects, see their GitHub pages: https://github.com/leaflabs/libmaple https://github.com/leaflabs/maple-ide While the two projects are developed separately, they are released in lockstep, and Maple IDE depends upon libmaple. (libmaple doesn't depend on Maple IDE). The generated documentation for the latest libmaple and Maple IDE release is available online in HTML form: http://leaflabs.com/docs/ The web interface is the recommended way for users to read the documentation. Older versions are available as well: http://static.leaflabs.com/pub/leaflabs/maple-docs/ This file contains instructions for generating the HTML files. About the Documentation ----------------------- The docs are written in Sphinx's extensions to reStructuredText (reST). You can read more about Sphinx here: http://sphinx.pocoo.org/tutorial.html Much of the documentation is pulled out of the libmaple source code. libmaple documents itself using Doxygen: http://doxygen.org We use a Sphinx plugin called Breathe to parse Doxygen's XML output into a form usable by Sphinx. You can read more about Breathe here: http://michaeljones.github.com/breathe/ Documentation Build Steps ------------------------- First, you will need to install some dependencies (Doxygen, Sphinx, and Breathe). 1. You need a recent-ish version of Doxygen in your PATH: http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc 2. Install Breathe, which does Doxygen-to-Sphinx conversion: Read/write version (for LeafLabs developers): $ git clone git@github.com:leaflabs/breathe.git Read-only version (for non-LeafLabs developers): $ git clone git://github.com/leaflabs/breathe.git After that's done, set an environment variable BREATHE_HOME to point to where you downloaded it. Something like this on bash: $ export BREATHE_HOME=/path/to/breathe/repo/ (You'll want to put this in your shell startup script). 3. Install Sphinx. From source or .egg: http://pypi.python.org/pypi/Sphinx#downloads Via easy_install: $ sudo easy_install -U Sphinx You need Sphinx version >= 1.0.6. You are now ready to build the documentation. First, you'll produce Doxygen XML output, then you can generate the HTML documentation. 1. Before the first time you run Sphinx (and any time the Doxygen comments in the libmaple source code are changed), you'll need to rebuild libmaple's Doxygen XML output. That is, from within the libmaple repository (i.e., NOT THIS REPOSITORY), run: $ make doxygen 2. Finally, you can build the documentation (in this folder): $ make html On Windows, use the batch file make.bat instead. Reading and Modifying the Documentation --------------------------------------- Just point your web browser at the file build/html/index.html It corresponds to the Sphinx file source/index.rst Read more about Sphinx and use the existing docs source as an example when writing yours. The directory tmpl/ contains template ReST files you should modify when creating a new page, in order to keep the style consistent. The file source/conf.py is the Sphinx configuration file; you can go read it for more information about our setup. All of the documentation which isn't pulled out of source code comments lives in source/. The directory source/_static/ is for static content (like style sheets); source/_templates/ is meant to contain Sphinx templates.