def parse_table(report_table: table) -> str: table_header = report_table.Heading table_body = str(report_table.Body) table_header_centred = centralise_text(table_header, table_body) underline_header = landing_strip_from_str(table_header_centred) table_string = "\n%s\n%s\n%s\n\n%s\n\n" % ( underline_header, table_header_centred, underline_header, table_body, ) return table_string
def parse_header(report_header: header) -> str: header_line = landing_strip(80, "*") header_text = centralise_text(report_header.Heading, header_line) return "\n%s\n%s\n%s\n\n\n" % (header_line, header_text, header_line)