GitXplorerGitXplorer
m

CHAOS-API-Documentation

public
0 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
cf2f4c6c46a35d6ae87576c088cf857b9dcb90c5

Change master branch to `v4`

mmalthejorgensen committed 11 years ago
Unverified
3d4fce28ecd50dce8c96427baf07e34ab448bf95

Add introduction to `API`

mmalthejorgensen committed 11 years ago
Unverified
439a7be0c02d6fbc73466e29739435523a834fe3

Add style to the `.. seealso::` directive

mmalthejorgensen committed 11 years ago
Unverified
a371e68cfdd21ae7eb017b089d3fa92940fe1f88

Style new API format

mmalthejorgensen committed 11 years ago
Unverified
be10242fe9362fba7e772c0a533e1557c6e5bf4b

Change API so it uses Sphinx Python Domain

mmalthejorgensen committed 11 years ago
Unverified
8378049fb7d2db7f7eb61f860a385476bc2c1ff0

Add version compatibility notice to PHP tutorial

mmalthejorgensen committed 11 years ago

README

The README file for this repository.

CHAOS API Documentation

The documentation can be viewed at http://chaos-community.github.io/CHAOS-API-Documentation/.

Build

The documentation is made with Sphinx. To get Sphinx, make sure you have Python installed (with Distribute) and install it via pip

> pip install sphinx

You can install all dependencies automatically with

> pip install -r requirements.txt

Note: Please do not add distribute to requirements.txt, as this breaks our drone.io continous integration for the documentation.

Once you have install Sphinx, you can build the documentation with

> make html

The docs will then be in build/html.

Guide

Sphinx uses reStructuredText (.rst) as markup language for its pages. A quick guide to reStructuredText can be found here.

PHP Portal Client documentation

Install the PHP domain for Sphinx

> pip install sphinxcontrib-phpdomain

Install the http://mark-story.com/posts/view/sphinx-phpdomain-released https://github.com/avalanche123/doxphp

> pear channel-discover pear.avalanche123.com
> pear install avalanche123/doxphp-beta

Autogenerate the API documentation

> cd src/CHAOS/Portal/Client/
> mkdir docs
> for f in $(find . -iname '*.php' -print0); do bf="$(basename $f)"; doxphp < $f | doxphp2sphinx > docs/$bf.rst; done

Caveats

  • restructuredText (.rst) does not support nested markup (link)
  • To have a non-paragraph linebreak (single instead of double) use |br| (link)

Continuous deployment

drone.io is setup to monitor the Github repository for changes. A push or commit to any of the version branches (master, v4 etc.) will automatically build the documentation of all versions and put them in the gh-pages branch. drone.io is set to run the following commands:

git checkout master
pip install -r requirements.txt --use-mirrors
python create_docs.py --commit
git push https://$TOKEN:@github.com/malthejorgensen/CHAOS-API-Documentation.git gh-pages

This of course assumes that the master branch has a create_docs.py script and a requirements.txt file. Furthermore a Github token login is set up and the token should be put in the TOKEN environment variable on drone.io:

TOKEN=b5836fa...

Credits

Inspired by: