oasislmf.utils.documentation.markdown ===================================== .. py:module:: oasislmf.utils.documentation.markdown Classes ------- .. autoapisummary:: oasislmf.utils.documentation.markdown.MarkdownGenerator Module Contents --------------- .. py:class:: MarkdownGenerator .. py:attribute:: sections :value: [] .. py:method:: get_markdown(generate_toc=False) Returns markdown string from joined self.sections Args: generate_toc (bool): Generate table of contents bool. Returns: str: Markdown string .. py:method:: generate_toc() Generate a table of contents from markdown string Returns: toc (str): Table of contents markdown string .. py:method:: add_header(title, level=1) Adds header to markdown Args: title (Any): Title string level (int): Markdown header level. Defaults to 1. .. py:method:: add_definition(title, content) Adds definition line to markdown in the following format **title**: content Args: title (Any): Name content (Any): Description .. py:method:: add_table(headers, rows) Adds a table to markdown with headers and rows Args: headers (List[str]): Headers rows (List[str]): Rows .. py:method:: add_list(items) Adds list to markdown Args: items (List[str]): List of items .. py:method:: add_collapsible_section(text, title='Root') Adds collapsible section to markdown Args: text (str): contents of collapsible section title (str, optional): Collapsible section title text. Defaults to "Root". .. py:method:: add_text(content) Adds text to markdown Args: content (Any): Text content