absfuyu.util.text_table module

Absufyu: Utilities

Text table

Version: 5.1.0 Date updated: 10/03/2025 (dd/mm/yyyy)

class absfuyu.util.text_table.OneColumnTableMaker(ncols: int | None = None, style: Literal['normal', 'bold', 'dashed', 'double'] = 'normal')[source]

Bases: BaseClass

Table Maker instance

Parameters:
  • ncols (int | None, optional) – Length of the table (include content). Must be >= 5. Set to None to use maximum length, defaults to 88 when failed to use os.get_terminal_size(). By default None

  • style (Literal["normal", "bold", "dashed", "double"], optional) – Style for the table, by default "normal"

ncols
add_title(title: str) None[source]

Add title to Table

Parameters:

title (str) – Title to add. When len(title) > ncols: title will not show

add_paragraph(paragraph: Sequence[str]) None[source]

Add paragraph into Table

Parameters:

paragraph (Sequence[str]) – An iterable of str

make_table() str[source]