stuff
thkit.stuff
¶
Functions:
-
chunk_list–Yield successive n-sized chunks from
input_list. -
text_fill_center–Create a line with centered text.
-
text_fill_left–Create a line with left-aligned text.
-
text_fill_box–Return a string centered in a box with side delimiters.
-
text_repeat–Repeat the input string to a specified length.
-
text_color–ANSI escape codes for color the text.
-
time_uuid– -
simple_uuid–Generate a simple random UUID of 4 digits.
chunk_list(input_list: list, n: int) -> Generator
¶
Yield successive n-sized chunks from input_list.
text_fill_center(input_text='example', fill='-', length=60)
¶
Create a line with centered text.
text_fill_left(input_text='example', margin=15, fill_left='-', fill_right=' ', length=60)
¶
Create a line with left-aligned text.
text_fill_box(input_text: str = '', fill: str = ' ', sp: str = 'ǁ', length: int = 60) -> str
¶
Return a string centered in a box with side delimiters.
Example
text_fill_box("hello", fill="-", sp="|", length=20) '|-------hello-------|'
Notes: - To input unicode characters, use the unicode escape sequence (e.g., "ǁ" for a specific character). See https://symbl.cc/en/unicode-table/ for more details. - ║ (double vertical bar, u2551) - ‖ (double vertical line, u2016) - ǁ (Latin letter lateral click, u01C1)
text_repeat(input_str: str, length: int) -> str
¶
Repeat the input string to a specified length.
text_color(text: str, color: str = 'blue') -> str
¶
ANSI escape codes for color the text. follow this link for more details.
time_uuid() -> str
¶
simple_uuid()
¶
Generate a simple random UUID of 4 digits.