oasislmf.utils.documentation.markdown¶
Classes¶
Module Contents¶
- class oasislmf.utils.documentation.markdown.MarkdownGenerator[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