From 619d8e1710418adad67345a68d51f6f6f5a426b5 Mon Sep 17 00:00:00 2001 From: steve donovan Date: Thu, 28 Mar 2013 13:28:05 +0200 Subject: [PATCH] -O for one col layout, -S for simple (no params,ret or summary); one col switches off function list. Bumped to 1.3.8 --- ldoc.lua | 12 +++++++++--- ldoc/html.lua | 1 + ldoc/html/ldoc_ltp.lua | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ldoc.lua b/ldoc.lua index b966598..837e5ba 100644 --- a/ldoc.lua +++ b/ldoc.lua @@ -7,7 +7,7 @@ -- -- C/C++ support for Lua extensions is provided. -- --- Available from LuaRocks as 'ldoc' and as a [Zip file](http://stevedonovan.github.com/files/ldoc-1.3.8.zip) +-- Available from LuaRocks as 'ldoc' and as a [Zip file](http://stevedonovan.github.com/files/ldoc-1.3.9.zip) -- -- [Github Page](https://github.com/stevedonovan/ldoc) -- @@ -35,7 +35,7 @@ app.require_here() --- @usage local usage = [[ -ldoc, a documentation generator for Lua, vs 1.3.8 +ldoc, a documentation generator for Lua, vs 1.3.9 -d,--dir (default docs) output directory -o,--output (default 'index') output name -v,--verbose verbose @@ -44,7 +44,6 @@ ldoc, a documentation generator for Lua, vs 1.3.8 -m,--module module docs as text -s,--style (default !) directory for style sheet (ldoc.css) -l,--template (default !) directory for template (ldoc.ltp) - -1,--one use one-column output layout -p,--project (default ldoc) project name -t,--title (default Reference) page title -f,--format (default plain) formatting - can be markdown, discount or plain @@ -56,6 +55,8 @@ ldoc, a documentation generator for Lua, vs 1.3.8 -C,--colon use colon style -B,--boilerplate ignore first comment in source files -M,--merge allow module merging + -S,--simple no return or params, no summary + -O,--one one-column output layout --dump debug output dump --filter (default none) filter output as Lua data (e.g pl.pretty.dump) --tags (default none) show all references to given tags, comma-separated @@ -437,6 +438,11 @@ if type(ldoc.examples) == 'table' then end) end +if args.simple then + ldoc.no_return_or_parms=true + ldoc.no_summary=true +end + ldoc.readme = ldoc.readme or ldoc.topics if type(ldoc.readme) == 'string' then ldoc.readme = {ldoc.readme} diff --git a/ldoc/html.lua b/ldoc/html.lua index 9684384..162bc9d 100644 --- a/ldoc/html.lua +++ b/ldoc/html.lua @@ -191,6 +191,7 @@ function html.generate_output(ldoc, args, project) ldoc.module = ldoc.single if ldoc.single and args.one then ldoc.kinds_allowed = {module = true, topic = true} + ldoc.one = true end ldoc.root = true if ldoc.module then diff --git a/ldoc/html/ldoc_ltp.lua b/ldoc/html/ldoc_ltp.lua index 9717c79..ddbcd36 100644 --- a/ldoc/html/ldoc_ltp.lua +++ b/ldoc/html/ldoc_ltp.lua @@ -50,7 +50,7 @@ return [==[ # end -# if ldoc.no_summary and module then -- bang out the functions on the side +# if ldoc.no_summary and module and not ldoc.one then -- bang out the functions on the side # for kind, items in module.kinds() do

$(kind)