I worked on a little thing and I drawed my project as similar-uml
using lua and graphviz (http://www.graphviz.org/)
prject source on bitbucket: https://bitbucket.org/bartoleo/prettydoclua/overview
alpha 0.0.1 release
it's written in LUA (yeah!!!)
it needs lfs library (luafilesystem) http://keplerproject.github.com/luafilesystem/
and lpeg library http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html
it can reformat your .lua files in a dir and subdirs (for each .lua it createas a .lua.ind file with code reformatted)
it can write a file called <yourdir>/doc/graph.dot with a similar-UML of your LUA files (to render it you needs graphviz)
reformat:
reindent code
eliminate tabs (tabs are only allowed in tab-indenting with -usetab option)
eliminate 2 or more cr/lf
trim trailing blanks
can add luadoc skeleton comment if missing
usage:
Code: Select all
Usage: c:\temp\prettydoclua\prettifier.lua root_dir [options]
Reindent/reformat .lua files.
Adding LUADOC skeleton comment if missing. (with --luadoc)
Creating .dot (uml charting) in root_dir/doc if present (with --chart)
For each .lua file will create a .lua.ind file containg reformat/LUADOC
Available options are:
--usetab use tabs for indenting (default is spaces)
--spaces:N to specify the number of spaces indenting (default:2)
--indentblockcomment enable indenting of block comments (comments
starting with --[[ (experimental)
--chart create .dot file in root_dir/doc if present
--noreformat disable indenting/reformatting
--luadoc adds luadoc skeleton comment/params if missing
--lex for each .lua file creates a .lua.lex containg
info on code tokenized
--help print this help and exit
--version print version information
if you don't want to reformat any files in a dir you can put a file called ".do_not_autoreformat" in dir
or in code if you want to disable reformat you can add this comment:
--do_not_autoreformat
and to reenable reformat
--do_autoreformat
it's alpha so use it at your own risk (make backup of code before trying)
untested on linux/mac
next: better reformatting
and code analysys (boh... )