How to document your current library with IDLdoc 2.0
posted Mon 1 May 2006 by Michael Galloy under IDL, IDLdocIDLdoc is a tool to generate documentation for IDL code. The generated documentation has been traditionally been HTML web pages, but with IDLdoc 2.0 the documentation can easily be capatible with the IDL Assistant or (with a bit more work) any text file type such as LaTeX, XML, Docbook, etc. Examples of IDLdoc output are my published library and demos. Special comments understood by IDLdoc can document specific characteristics of your code, but IDLdoc can produce (at least somewhat) useful output of nearly any IDL code.
Steps to document your library with minimal work
You can customize the output of IDLdoc quite a bit, but if you just want the basics without much work, try:
- Download IDLdoc
2.0. - Unzip IDLdoc into a directory in your path.
- If your library is in
libdir
then use the command:
idldoc, root=libdir, output=docdir
The directory libdir
is the path to the root directory of your library and docdir
is the path to the documentation to be produced (the directory will be created if it doesn’t exist).
Even if you haven’t documented your code at all (much less with special IDLdoc tags), this will still produce a browseable, searchable set of web pages that document the routine names and parameters for your library.
If you have comments before your routines in the standard format (starting with a ;+
line and ending with a ;-
line), IDLdoc will use them for the comments for the routine. Using the PREFORMAT
to IDLDOC
might produce better looking results if you have lined your comments up vertically in any way.
After producing your documentation, go todocdir
and bring up index.html in your favorite browser to see the results. For more information, see the “Help” link in the navigation bar near the top of the page, the file idldoc-help.html
in the docs directory of the IDLdoc distribution, or stayed tuned to this site for more articles. Next up: how to add special “tags” to your comments that give IDLdoc more specific information.
May 18th, 2006 at 11:41 pm
[…] The previous article about IDLdoc showed how to get and run IDLdoc on your library without changing any of your code. Now, what if you are willing to add special tags to your comments for IDLdoc’s use? […]
June 12th, 2007 at 9:15 am
I started using the keyword /Statistics for IDLdoc.
Could you provide a brief explaination of the McCabe statistics output found in the HTML :
McCabe cyclic
McCabe essential
McCabe modular design
Or a reference?
Kelly Dean
Fort Collins, CO
June 13th, 2007 at 5:31 pm
There is a basic reference in Code Complete by Steve McConnell, but I don’t think there are details about each statistic. The statistics basically count the number of decision points in the code in order to give a number to how complex the code is.
I will look it up and report back. I’m traveling right now, so it might take a while to find where I got it from.
July 16th, 2007 at 4:35 pm
Another reference can be found here.
September 12th, 2007 at 4:37 pm
Found this at Carnegie Mellon’s Software Engineering Institute – Cyclomatic Complexity [ HTML ].
Kelly Dean
Fort Collins, CO
September 18th, 2007 at 4:24 am
Hi Mike,
I’m using IDLdoc and it’s great.
However I don’t manage to activate the ‘Source’ link of the navbar browsing individual html routine pages.
How can I do that?
Thanks,
Nicolas
September 18th, 2007 at 8:56 am
Nicolas,
The “Source” link is only available when *not* using the OUTPUT keyword. The idea is either you run IDLdoc “in place” (no OUTPUT keyword, just adding the HTML files to the same location as your .pro source files) or send output to another directory (use OUTPUT keyword, HTML files get sent to output directory, but .pro files stay where they are).
When IDLdoc 3.0 comes out, I’m hoping to have a chromocoded version of the source always available from the source link.
-Mike