class documentation

class TextWriter(BaseWriter): (source)

View In Hierarchy

Format layouts as text (ReStructured inspiration but not totally handled yet).

Method __init__ Undocumented
Method default_table Format a table.
Method visit_evaluationsection Display an evaluation section as a text.
Method visit_paragraph Enter a paragraph.
Method visit_section Display a section as text.
Method visit_table Display a table as text.
Method visit_text Add some text.
Method visit_title Undocumented
Method visit_verbatimtext Display a verbatim layout as text (so difficult ;).
Instance Variable list_level Undocumented

Inherited from BaseWriter:

Method begin_format Begin to format a layout.
Method compute_content Trick to compute the formatting of children layout before actually writing it.
Method end_format Finished formatting a layout.
Method format Format and write the given layout into the stream object.
Method format_children Recurse on the layout children and call their accept method (see the Visitor pattern).
Method get_table_content Trick to get table content without actually writing it.
Method write Write a string in the output buffer.
Method writeln Write a line in the output buffer.
Instance Variable encoding Undocumented
Instance Variable out Undocumented
Instance Variable section Undocumented
def __init__(self): (source)

Undocumented

def default_table(self, layout: Table, table_content: list[list[str]], cols_width: list[int]): (source)

Format a table.

def visit_evaluationsection(self, layout: EvaluationSection): (source)

Display an evaluation section as a text.

def visit_paragraph(self, layout: Paragraph): (source)

Enter a paragraph.

def visit_section(self, layout: Section): (source)

Display a section as text.

def visit_table(self, layout: Table): (source)

Display a table as text.

def visit_text(self, layout: Text): (source)

Add some text.

def visit_title(self, layout: Title): (source)

Undocumented

def visit_verbatimtext(self, layout: VerbatimText): (source)

Display a verbatim layout as text (so difficult ;).

list_level: int = (source)

Undocumented