doc: Fix the UML template luacheck issues
This commit is contained in:
parent
3c0d5b606f
commit
328551d479
|
@ -17,4 +17,4 @@ Core components relationship
|
|||
<tr><td>screen</td><td><img src="../images/AUTOGEN_uml_nav_tables_client8.svg"></td><td>s.tiled_clients</td></tr>
|
||||
<tr><td>mouse</td><td><img src="../images/AUTOGEN_uml_nav_tables_client9.svg"></td><td>mouse.current_client</td></tr>
|
||||
</table></div>
|
||||
</div><div class="components-relationship--legend"><b>Legend:</b> <i>c</i>: a client object, <i>t</i>: a tag object, <i>s</i>: a screen object, <i>k</i>: an awful.key object, <i>b</i>: a awful.button object, <i>n</i>: a naughty.notification object</div></div> <!-- .components-relationship -->
|
||||
</div><div class="components-relationship--legend"><b>Legend:</b> <i>c</i>: a client object, <i>t</i>: a tag object, <i>s</i>: a screen object, <i>k</i>: an awful.key object, <i>b</i>: a awful.button object,<i>n</i>: a naughty.notification object</div></div> <!-- .components-relationship -->
|
||||
|
|
|
@ -17,4 +17,4 @@ Core components relationship
|
|||
<tr><td>client</td><td><img src="../images/AUTOGEN_uml_nav_tables_screen8.svg"></td><td>c.screen</td></tr>
|
||||
<tr><td>naughty.notification</td><td><img src="../images/AUTOGEN_uml_nav_tables_screen9.svg"></td><td>n.screen</td></tr>
|
||||
</table></div>
|
||||
</div><div class="components-relationship--legend"><b>Legend:</b> <i>c</i>: a client object, <i>t</i>: a tag object, <i>s</i>: a screen object, <i>k</i>: an awful.key object, <i>b</i>: a awful.button object, <i>n</i>: a naughty.notification object</div></div> <!-- .components-relationship -->
|
||||
</div><div class="components-relationship--legend"><b>Legend:</b> <i>c</i>: a client object, <i>t</i>: a tag object, <i>s</i>: a screen object, <i>k</i>: an awful.key object, <i>b</i>: a awful.button object,<i>n</i>: a naughty.notification object</div></div> <!-- .components-relationship -->
|
||||
|
|
|
@ -14,4 +14,4 @@ Core components relationship
|
|||
<tr><td>screen</td><td><img src="../images/AUTOGEN_uml_nav_tables_tag5.svg"></td><td>s.selected_tag</td></tr>
|
||||
<tr><td>screen</td><td><img src="../images/AUTOGEN_uml_nav_tables_tag6.svg"></td><td>s.selected_tags</td></tr>
|
||||
</table></div>
|
||||
</div><div class="components-relationship--legend"><b>Legend:</b> <i>c</i>: a client object, <i>t</i>: a tag object, <i>s</i>: a screen object, <i>k</i>: an awful.key object, <i>b</i>: a awful.button object, <i>n</i>: a naughty.notification object</div></div> <!-- .components-relationship -->
|
||||
</div><div class="components-relationship--legend"><b>Legend:</b> <i>c</i>: a client object, <i>t</i>: a tag object, <i>s</i>: a screen object, <i>k</i>: an awful.key object, <i>b</i>: a awful.button object,<i>n</i>: a naughty.notification object</div></div> <!-- .components-relationship -->
|
||||
|
|
|
@ -166,12 +166,20 @@ local map = {
|
|||
}
|
||||
|
||||
local function gen_table_header(title, o)
|
||||
print([[<div class="components-relationship--diagram"><table class='widget_list' border=1><colgroup span="3"></colgroup><tr><th align='center' colspan=3 scope=colgroup>]]..map[title](o)..[[</th></tr><tr style='font-weight: bold;'><th align='center'>Class</th><th align='center'></th><th align='center'>Property</th></tr>]])
|
||||
print(table.concat({[[<div class="components-relationship--diagram">]],
|
||||
[[<table class='widget_list' border=1>]],
|
||||
[[<colgroup span="3"></colgroup>]],
|
||||
[[<tr><th align='center' colspan=3 scope=colgroup>]]..map[title](o)..[[</th></tr>]],
|
||||
[[<tr style='font-weight: bold;'>]],
|
||||
[[<th align='center'>Class</th><th align='center'></th><th align='center'>Property</th>]],
|
||||
[[</tr>]]
|
||||
}))
|
||||
|
||||
end
|
||||
|
||||
local function get_table_row(path, class, prop)
|
||||
print([[<tr><td>]].. class ..[[</td><td><img src="]]..path..[["></td><td>]].. prop ..[[</td></tr>]])
|
||||
local function get_table_row(rel_path, class, prop)
|
||||
print([[<tr><td>]].. class ..[[</td><td><img src="]]..rel_path
|
||||
..[["></td><td>]].. prop ..[[</td></tr>]])
|
||||
end
|
||||
|
||||
local function get_table_footer()
|
||||
|
@ -197,11 +205,11 @@ function module.generate_nav_table(t)
|
|||
assert(entry.class)
|
||||
assert(entry.left.msg and entry.left.card)
|
||||
assert(entry.right.msg and entry.right.card)
|
||||
local path = relative_image_path..counter..".svg"
|
||||
local rel_path = relative_image_path..counter..".svg"
|
||||
local fpath = image_path..counter..".svg"
|
||||
local widget = gen_table_uml(entry, t.class, entry.class, false)
|
||||
wibox.widget.draw_to_svg_file(widget, fpath, 320, 50)
|
||||
get_table_row(path, entry.class, entry[tab.."_property"])
|
||||
get_table_row(rel_path, entry.class, entry[tab.."_property"])
|
||||
counter = counter + 1
|
||||
end
|
||||
end
|
||||
|
@ -209,7 +217,12 @@ function module.generate_nav_table(t)
|
|||
end
|
||||
|
||||
-- End the last section and add a footer
|
||||
print([[</div><div class="components-relationship--legend"><b>Legend:</b> <i>c</i>: a client object, <i>t</i>: a tag object, <i>s</i>: a screen object, <i>k</i>: an awful.key object, <i>b</i>: a awful.button object, <i>n</i>: a naughty.notification object</div></div> <!-- .components-relationship -->]])
|
||||
print(table.concat({[[</div><div class="components-relationship--legend">]],
|
||||
[[<b>Legend:</b> <i>c</i>: a client object, <i>t</i>: a tag object, <i>s</i>]],
|
||||
[[: a screen object, <i>k</i>: an awful.key object, <i>b</i>: a awful.button object,]],
|
||||
[[<i>n</i>: a naughty.notification object</div></div> ]],
|
||||
[[<!-- .components-relationship -->]]
|
||||
}))
|
||||
end
|
||||
|
||||
loadfile(file_path)(module)
|
||||
|
|
Loading…
Reference in New Issue