pattern_clustering.html.lines_to_html
- lines_to_html(lines: list, skip_line: Optional[callable] = None, line_to_html: Optional[callable] = None) str [source]
Exports a list of
str
to HTML.- Parameters
lines (list) – The list of strings where each string corresponds to the lines of the input file.
skip_line (callable) – A
Callback(int, str) -> bool
taking in parameters the row and the line content, and returningTrue
if the line is relevant. By default, all lines are considered.line_to_html (callable) – A
Callback(int, str) -> str
taking in parameters the row (line number) and the line content, and returning the corresponding HTML rendering.
- Returns
The corresponding HTML string