I couldn't afford the last vowel.
What is it? It's like Docco. In fact, it uses pretty much the same algorithm, as well as the same template + css to generate docs from given files.
What makes it different from Docco?
- It handles recursing into directories.
- You can provide your own extensions file -- no need to fork the project to add support for your favorite language.
- You can choose the template, css file, and the base media url with which to generate docs.
Make sure you have node 0.3 (at minimum) installed and pygments installed.
pip install pygments npm install narrativ
And you're ready to go.
To generate docs for narrativ:
git clone git://github.com/chrisdickinson/narrativ.git cd narrativ narrativ lib -O docs
If want other extensions enabled, the file looks like this:
language is the pygment's designation for the language you're trying to match, and
symbol is the string representing a single
line comment. Pass in the file to narrativ using
narrativ -X /path/to/extensions.json.
If you want another template to render your docs with, create a django-style template. You have access to almost all of the tags, with the exception of
url. These may be supported in a later version of narrativ. Pass in the template to narrativ
narrativ -T /path/to/template.html.
Passing in CSS works similarly. It will be written to the root of your target directory. You can optionally decorate it with a URL, in case you're serving your CSS externally. To do this, pass in
narrativ -u http://localhost:8000/, but you must include the trailing slash.