mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-01-04 00:37:04 -08:00
48 lines
1.1 KiB
Python
48 lines
1.1 KiB
Python
import sys
|
|
from _ansi_utils import (
|
|
print_rule,
|
|
print_table_row,
|
|
strip_markdown,
|
|
wrap_text,
|
|
get_terminal_width,
|
|
)
|
|
|
|
HEADER_COLOR = sys.argv[1]
|
|
SEPARATOR_COLOR = sys.argv[2]
|
|
|
|
# Get terminal dimensions
|
|
term_width = get_terminal_width()
|
|
|
|
# Print title centered
|
|
print("{CHARACTER_NAME}".center(term_width))
|
|
|
|
rows = [
|
|
("Native Name", "{CHARACTER_NATIVE_NAME}"),
|
|
("Gender", "{CHARACTER_GENDER}"),
|
|
]
|
|
|
|
print_rule(SEPARATOR_COLOR)
|
|
for key, value in rows:
|
|
print_table_row(key, value, HEADER_COLOR, 15, term_width - 20)
|
|
|
|
rows = [
|
|
("Age", "{CHARACTER_AGE}"),
|
|
("Blood Type", "{CHARACTER_BLOOD_TYPE}"),
|
|
]
|
|
|
|
print_rule(SEPARATOR_COLOR)
|
|
for key, value in rows:
|
|
print_table_row(key, value, HEADER_COLOR, 15, term_width - 20)
|
|
|
|
rows = [
|
|
("Birthday", "{CHARACTER_BIRTHDAY}"),
|
|
("Favourites", "{CHARACTER_FAVOURITES}"),
|
|
]
|
|
|
|
print_rule(SEPARATOR_COLOR)
|
|
for key, value in rows:
|
|
print_table_row(key, value, HEADER_COLOR, 15, term_width - 20)
|
|
|
|
print_rule(SEPARATOR_COLOR)
|
|
print(wrap_text(strip_markdown("""{CHARACTER_DESCRIPTION}"""), term_width))
|