oasislmf.utils.documentation.markdown

Classes

Module Contents

class oasislmf.utils.documentation.markdown.MarkdownGenerator[source]
sections = [][source]
get_markdown(generate_toc=False)[source]

Returns markdown string from joined self.sections Args:

generate_toc (bool): Generate table of contents bool.

Returns:

str: Markdown string

generate_toc()[source]

Generate a table of contents from markdown string Returns:

toc (str): Table of contents markdown string

add_header(title, level=1)[source]

Adds header to markdown Args:

title (Any): Title string level (int): Markdown header level. Defaults to 1.

add_definition(title, content)[source]

Adds definition line to markdown in the following format title: content Args:

title (Any): Name content (Any): Description

add_table(headers, rows)[source]

Adds a table to markdown with headers and rows Args:

headers (List[str]): Headers rows (List[str]): Rows

add_list(items)[source]

Adds list to markdown Args:

items (List[str]): List of items

add_collapsible_section(text, title='Root')[source]

Adds collapsible section to markdown Args:

text (str): contents of collapsible section title (str, optional): Collapsible section title text. Defaults to “Root”.

add_text(content)[source]

Adds text to markdown Args:

content (Any): Text content