INNER CODE UNIT · Python
makeTableMD
KATRIN-Experiment/Kassiopeia · Scripts/gen-bindings-docs.py:291
def makeTableMD(self, level=0, stack=[], nodes=set(), key='', with_sections=False, with_examples=False):
global base_url
numCols = 6
colWidth = 5
colHeaders = ('element name', 'source files', 'child elements', 'child types', 'attributes', 'attribute types')
if not key and self.xml_names:
key = list(self.xml_names)[0]
escapeStr = lambda txt: txt.translate(dict([ (ord(c),f'\{c}') for c in "<>" ])) # escape invalid chars
cleanStr = lambda txt: txt.translate(dict([ (ord(c),f'_') for c in "<>" ])) # strip invalid chars
full_name = cleanStr(f'{self.name}')
if full_name in nodes:
return nodes
nodes.add(full_name)
if with_sections:
if self.children or self.attributes or self.xml_names: