참고소스 수정본
This commit is contained in:
22
참고/knowledge_agent-main/terminal_utils.py
Normal file
22
참고/knowledge_agent-main/terminal_utils.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# terminal_utils.py
|
||||
import random
|
||||
|
||||
def print_colorful_break(text: str):
|
||||
"""Prints a colorful horizontal break with a title."""
|
||||
colors = [
|
||||
"\033[91m", # Red
|
||||
"\033[92m", # Green
|
||||
"\033[93m", # Yellow
|
||||
"\033[94m", # Blue
|
||||
"\033[95m", # Magenta
|
||||
"\033[96m", # Cyan
|
||||
]
|
||||
reset_color = "\033[0m"
|
||||
|
||||
color = random.choice(colors)
|
||||
|
||||
width = 80
|
||||
padding = (width - len(text) - 2)
|
||||
|
||||
print(f"\n{color}{'=' * (padding // 2)} {text} {'=' * (padding - (padding // 2))}{reset_color}\n")
|
||||
|
||||
Reference in New Issue
Block a user