-O for one col layout, -S for simple (no params,ret or summary); one col switches off function list. Bumped to 1.3.8
This commit is contained in:
parent
897061ac17
commit
619d8e1710
12
ldoc.lua
12
ldoc.lua
|
@ -7,7 +7,7 @@
|
||||||
--
|
--
|
||||||
-- C/C++ support for Lua extensions is provided.
|
-- 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)
|
-- [Github Page](https://github.com/stevedonovan/ldoc)
|
||||||
--
|
--
|
||||||
|
@ -35,7 +35,7 @@ app.require_here()
|
||||||
|
|
||||||
--- @usage
|
--- @usage
|
||||||
local 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
|
-d,--dir (default docs) output directory
|
||||||
-o,--output (default 'index') output name
|
-o,--output (default 'index') output name
|
||||||
-v,--verbose verbose
|
-v,--verbose verbose
|
||||||
|
@ -44,7 +44,6 @@ ldoc, a documentation generator for Lua, vs 1.3.8
|
||||||
-m,--module module docs as text
|
-m,--module module docs as text
|
||||||
-s,--style (default !) directory for style sheet (ldoc.css)
|
-s,--style (default !) directory for style sheet (ldoc.css)
|
||||||
-l,--template (default !) directory for template (ldoc.ltp)
|
-l,--template (default !) directory for template (ldoc.ltp)
|
||||||
-1,--one use one-column output layout
|
|
||||||
-p,--project (default ldoc) project name
|
-p,--project (default ldoc) project name
|
||||||
-t,--title (default Reference) page title
|
-t,--title (default Reference) page title
|
||||||
-f,--format (default plain) formatting - can be markdown, discount or plain
|
-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
|
-C,--colon use colon style
|
||||||
-B,--boilerplate ignore first comment in source files
|
-B,--boilerplate ignore first comment in source files
|
||||||
-M,--merge allow module merging
|
-M,--merge allow module merging
|
||||||
|
-S,--simple no return or params, no summary
|
||||||
|
-O,--one one-column output layout
|
||||||
--dump debug output dump
|
--dump debug output dump
|
||||||
--filter (default none) filter output as Lua data (e.g pl.pretty.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
|
--tags (default none) show all references to given tags, comma-separated
|
||||||
|
@ -437,6 +438,11 @@ if type(ldoc.examples) == 'table' then
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if args.simple then
|
||||||
|
ldoc.no_return_or_parms=true
|
||||||
|
ldoc.no_summary=true
|
||||||
|
end
|
||||||
|
|
||||||
ldoc.readme = ldoc.readme or ldoc.topics
|
ldoc.readme = ldoc.readme or ldoc.topics
|
||||||
if type(ldoc.readme) == 'string' then
|
if type(ldoc.readme) == 'string' then
|
||||||
ldoc.readme = {ldoc.readme}
|
ldoc.readme = {ldoc.readme}
|
||||||
|
|
|
@ -191,6 +191,7 @@ function html.generate_output(ldoc, args, project)
|
||||||
ldoc.module = ldoc.single
|
ldoc.module = ldoc.single
|
||||||
if ldoc.single and args.one then
|
if ldoc.single and args.one then
|
||||||
ldoc.kinds_allowed = {module = true, topic = true}
|
ldoc.kinds_allowed = {module = true, topic = true}
|
||||||
|
ldoc.one = true
|
||||||
end
|
end
|
||||||
ldoc.root = true
|
ldoc.root = true
|
||||||
if ldoc.module then
|
if ldoc.module then
|
||||||
|
|
|
@ -50,7 +50,7 @@ return [==[
|
||||||
# end
|
# 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
|
# for kind, items in module.kinds() do
|
||||||
<h2>$(kind)</h2>
|
<h2>$(kind)</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
Loading…
Reference in New Issue