Showing posts with label Documentation. Show all posts
Showing posts with label Documentation. Show all posts

Wednesday, September 28, 2011

Writting LUA script 'User Manual' with ROBODoc

I've wrote a script using LUA for wireshark.
Now I need to document it, so I won't forget what I wrote when I'll come back to the code, 2-6 months later.

After a short research I've found this very nice documentation tool:

ROBODoc 4.99.40 User Manual

and here is an example config file (you'll need it later) I wrote (modified from this source: http://qe-forge.org/cgi-bin/cvstrac/q-e/fileview?f=espresso/GUI/Guib/doc/robodoc.rc&v=1.3)...

options:
    --src ../
    --doc ./api/printable/TBD-api
    --internal
    --html
    --singledoc
    --sections
    --toc
    --tabsize 4
    --index
    --nopre
    --documenttitle "TBD --  To Be Defined."
    --sectionnameonly
    --syntaxcolors_enable quotes,line_comments,block_comments,keywords,non_alpha

accept files:
 *.lua

ignore files:
 .svn
 doc

headertypes:
 e "Enums"    robo_sections

ignore items:

item order:
    FUNCTION
    SYNOPSIS
    INPUTS
    RETURN VALUE
source items:
    SYNOPSIS
    
header markers:
    --****
remark markers:
    --
end markers:
    --****
    
remark begin markers:
    --
remark end markers:
    --

keywords:
 and       
 break     
 do        
 else      
 elseif
 end       
 false     
 for       
 function  
 if
 in        
 local     
 nil       
 not       
 or
 repeat    
 return    
 then      
 true      
 until     
 while

source line comments:
       --
   

getopt — Python's C-style parser for command line arguments.

Need to support command line arguments and options in your new Python program, here's what I've found:

Example code - http://www.eurion.net/python-snippets/snippet/Show%20getopt.html
Tutorial - http://www.doughellmann.com/PyMOTW/getopt/
Documentation - http://docs.python.org/library/getopt.html

Saturday, March 19, 2011

Tcl documentation

After 2-3 days of research, analyzing the available options and trying to work with some doc tools - here is my conclusion for Tcl documentation:

ROBODoc
Homepagehttp://www.xs4all.nl/~rfsber/Robo/
Wiki          - http://en.wikipedia.org/wiki/ROBODoc


Impressions
  • VERY easy
  • Clean documentation
  • Various output types (PDF, HTML, CHM, ...)
  • Supports many languages (If you manually configure it I believe it can support any language). 

I've also tried Doxygen
Prons
  • After spending 1/2 a day i gave up configuring it with Tcl.
  • The documentation in the code should have special chars 
    • Ugly inline documentation
    • When pressing F2 (function quick help) this ugly characters make the documentation more ugly.
  • At this stage I gave up.

Major resource pages