def get_html(obj) -> str: # Construct a node tree structure. node = mkapi.get_node(obj) # Create a joint Markdown from components of the node. markdown = node.get_markdown() # Convert it into HTML by any external converter. html = converter.convert(markdown) # Split and distribute the HTML into original components. node.set_html(html) # Render the node to create final HTML. return node.render()
def d(): return mkapi.get_node(D)
def c(): return mkapi.get_node(C)
def b(): return mkapi.get_node(B)
def a(): return mkapi.get_node(A)
"""Init docstring.""" self.a: int = 1 #: Integer **attribute**. def to_str(self, x: int) -> str: """Converts `int` to `str`. Args: x: Input **value**. """ return str(x) # `mkapi.get_node()` generates a `Node` object that has tree structure. # - node = mkapi.get_node(A) type(node) # Some attributes: node.object.kind, node.object.name # - docstring = node.docstring len(docstring.sections) # type:ignore # - section = docstring.sections[0] # type:ignore section.name, section.markdown # - section = docstring.sections[1] # type:ignore section.name, section.markdown