DokGen

From IokeWiki
Jump to: navigation, search

DokGen is the tool that is used to generate the reference documentation for Ioke, and it generates output similar to RDoc.

Its goal is to be a general purpose tool for any Ioke application. It extracts the documentation information from defined objects and then generates an HTML structure from it that can be easily navigated. If specs are available for objects and methods, it will try to incorporate these together with the documentation.

You can use the dokgen tool to generate documentation using two different strategies. The default strategy is to load all existing specs and then find out the documentation for the tested cells. The other alternative is to traverse the whole system and use this information to generate documentation output. The second option is generally only useful to get the full documentation for the Ioke system.

The options to the dokgen script are these:

-o outputDir
The name of the directory where to put the generated documentation. The default is "dok".
-t
Sets the option to traverse the full system instead of using the specs to drive documentation collection.
-S, --nospec
Don't load specs to combine with documentation. This implies -t.
-s, --specs pattern
What pattern should be used to find specs. By default this is "test/**/*_spec.ik". Anything that is a valid FileSystem glob pattern is valid here.
-I dir
Add a new directory to the load path

If you follow the default Ioke directory structure it should be possible to generate documentation for it using dokgen -Ilib.