md_util
Author: Heli Qi Affiliation: NAIST Date: 2022.07
get_list_strings(content_dict, header_bold=True)
Return the .md string for making a list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
content_dict
|
Dict
|
Dict The main body of the list. Each key-value item corresponds to a row. The key is the header name and the value is the content. |
required |
header_bold
|
bool
|
bool Controls whether the header names are bolded. |
True
|
Returns:
Type | Description |
---|---|
The well-structured .md list string. |
Source code in speechain/utilbox/md_util.py
get_table_strings(contents, first_col=None, first_col_bold=True, headers=None, header_bold=True)
Return the .md string for making a table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
contents
|
List[List] or List
|
List[List] or List The main body of the table. Each list element corresponds to a row. |
required |
first_col
|
List
|
List The values of the first column. If not given, no first column will be added. |
None
|
first_col_bold
|
bool
|
bool Controls whether the values of the first column is bolded. |
True
|
headers
|
List
|
List The values of the table headers. If not given, no header will be added. |
None
|
header_bold
|
bool
|
bool Controls whether the values of the header is bolded. |
True
|
Returns:
Type | Description |
---|---|
The well-structured .md table string. |