summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-04-28 16:20:27 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-05-12 11:59:09 +0100
commit18542180eaa889c734d720cd088266ec4aeca758 (patch)
treee2e9720a4de6a01bfa43a81b9519dadfc33085a9
parentff57eec82ef474314663fddef183725250570c56 (diff)
downloadefl-18542180eaa889c734d720cd088266ec4aeca758.tar.gz
docgen: add params to disable usage of graphviz and notes plugins
-rw-r--r--gendoc.lua20
1 files changed, 12 insertions, 8 deletions
diff --git a/gendoc.lua b/gendoc.lua
index 6ca9c3f619..c774767a56 100644
--- a/gendoc.lua
+++ b/gendoc.lua
@@ -701,12 +701,12 @@ local Writer = util.Object:clone {
end,
write_par = function(self, str)
- local notetypes = {
+ local notetypes = global_opts.use_notes and {
["Note: "] = "<note>\n",
["Warning: "] = "<note warning>\n",
["Remark: "] = "<note tip>\n",
["TODO: "] = "<note>\n**TODO:** "
- }
+ } or {}
local tag
for k, v in pairs(notetypes) do
if str:match("^" .. k) then
@@ -1372,8 +1372,10 @@ local build_class = function(cl)
f:write_h("Inheritance hierarchy", 3)
f:write_list(build_inherits(cl))
f:write_nl()
- f:write_graph(build_igraph(cl))
- f:write_nl(2)
+ if global_opts.use_dot then
+ f:write_graph(build_igraph(cl))
+ f:write_nl(2)
+ end
f:write_h("Description", 3)
write_full_doc(f, cl:documentation_get())
@@ -1575,16 +1577,18 @@ getopt.parse {
{ category = "Generator" },
{ "r", "root", true, help = "Root path of the docs." },
- { "n", "namespace", true, help = "Root namespace of the docs." }
+ { "n", "namespace", true, help = "Root namespace of the docs." },
+ { nil, "disable-graphviz", false, help = "Disable graphviz usage." },
+ { nil, "disable-notes", false, help = "Disable notes plugin usage." }
},
error_cb = function(parser, msg)
io.stderr:write(msg, "\n")
getopt.help(parser, io.stderr)
end,
done_cb = function(parser, opts, args)
- if opts["v"] then
- global_opts.verbose = true
- end
+ global_opts.verbose = not not opts["v"]
+ global_opts.use_dot = not opts["disable-graphviz"]
+ global_opts.use_notes = not opts["disable-notes"]
global_opts.root_nspace = (not opts["n"] or opts["n"] == "")
and "efl" or opts["n"]
if not opts["r"] or opts["r"] == "" then