AQIT 0.1.0
Loading...
Searching...
No Matches
aquin.ascii_layout Namespace Reference

Functions

int width ()
str ascii_safe (str text)
str rule (str char="=", int|None w=None)
str center (str text, int|None w=None)
list[str] center_block (list[str] lines, int|None w=None)
str box_top (int|None w=None)
str box_bottom (int|None w=None)
str box_line (str text, int|None w=None)
list[str] box_lines (str text, int|None w=None)
str kv_line (str label, str value, *, int label_width=10, int|None w=None)
None print_logo ()
None print_banner (*, str subtitle, int|None w=None)
None print_section (str title, list[str] body_lines, *, int|None w=None)

Variables

str BANNER

Function Documentation

◆ ascii_safe()

str ascii_safe ( str text)

Definition at line 31 of file ascii_layout.py.

Referenced by box_line(), and box_lines().

◆ box_bottom()

str box_bottom ( int | None w = None)

Definition at line 65 of file ascii_layout.py.

References box_top().

Referenced by print_section().

◆ box_line()

str box_line ( str text,
int | None w = None )

Definition at line 69 of file ascii_layout.py.

References ascii_safe(), and width().

Referenced by box_lines(), kv_line(), and print_section().

◆ box_lines()

list[str] box_lines ( str text,
int | None w = None )

Definition at line 78 of file ascii_layout.py.

References ascii_safe(), box_line(), and width().

Referenced by print_section().

◆ box_top()

str box_top ( int | None w = None)

Definition at line 60 of file ascii_layout.py.

References width().

Referenced by box_bottom(), and print_section().

◆ center()

str center ( str text,
int | None w = None )

Definition at line 45 of file ascii_layout.py.

References width().

Referenced by print_banner().

◆ center_block()

list[str] center_block ( list[str] lines,
int | None w = None )
Pad lines to equal width, then center the block as one unit.

Definition at line 49 of file ascii_layout.py.

References width().

Referenced by print_banner().

◆ kv_line()

str kv_line ( str label,
str value,
* ,
int label_width = 10,
int | None w = None )
Boxed key/value row: '  label  value'.

Definition at line 102 of file ascii_layout.py.

References box_line(), and width().

◆ print_banner()

None print_banner ( * ,
str subtitle,
int | None w = None )

Definition at line 115 of file ascii_layout.py.

References center(), center_block(), rule(), and width().

◆ print_logo()

None print_logo ( )
Bare Aquin figlet :  used for `aquin` with no args.

Definition at line 109 of file ascii_layout.py.

◆ print_section()

None print_section ( str title,
list[str] body_lines,
* ,
int | None w = None )
Print a titled ASCII box. body_lines are already boxed or plain content rows.

Definition at line 126 of file ascii_layout.py.

References box_bottom(), box_line(), box_lines(), box_top(), and width().

◆ rule()

str rule ( str char = "=",
int | None w = None )

Definition at line 41 of file ascii_layout.py.

References width().

Referenced by print_banner().

◆ width()

int width ( )

Variable Documentation

◆ BANNER

str aquin.ascii_layout.BANNER
Initial value:
= r"""
___ ____ __ _______ __
/ | / __ \/ / / / _/ | / /
/ /| |/ / / / / / // // |/ /
/ ___ / /_/ / /_/ // // /| /
/_/ |_\___\_\____/___/_/ |_/
""".strip("\n")

Definition at line 14 of file ascii_layout.py.