Difference between revisions of "DokGen"

From IokeWiki
Jump to: navigation, search
Line 3: Line 3:
 
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. At the moment, there is no way to run dokgen on a subset of Ioke code, but that should be available very soon now.
 
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. At the moment, there is no way to run dokgen on a subset of Ioke code, but that should be available very soon now.
  
At the moment, running the <tt>dokgen</tt> script will create a directory called <tt>dok</tt>, which contains the full documentation. It will use all specs it can find in the <tt>test</tt> directory.
+
You can use the <tt>dokgen</tt> 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 <tt>dokgen</tt> 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 <code>dokgen -Ilib</code>.

Revision as of 22:09, 22 December 2009

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. At the moment, there is no way to run dokgen on a subset of Ioke code, but that should be available very soon now.

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.