MCPcopy Create free account
hub / github.com/Kitware/VTK / create_module_table

Function create_module_table

Documentation/docs/vtk_documentation.py:118–135  ·  view source on GitHub ↗

Generate a markdown table holding name and description of each vtk module

(module_list)

Source from the content-addressed store, hash-verified

116
117
118def create_module_table(module_list):
119 """Generate a markdown table holding name and description of each vtk
120 module"""
121
122 table = "| Module Name | Description|\n"
123 table += "|-------------|------------|\n"
124 for module in sorted(module_list, key=lambda item: item["NAME"][0]):
125 name = "{{bdg-primary-line}}`{module_name}`".format(
126 module_name=module["NAME"][0]
127 )
128 description = module.get("DESCRIPTION", [""])[0]
129 # extra documentation exists add link
130 if "readme" in module.keys():
131 value = module["readme"]
132 description += f" [{{material-regular}}`menu_book;2em`](../{value})"
133 line = "| " + name + "|" + description + "|"
134 table += line + "\n"
135 return table
136
137
138# -----------------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

formatMethod · 0.45
getMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected