|
|
@ -10,28 +10,28 @@ from rich.text import Text
|
|
|
|
console = Console()
|
|
|
|
console = Console()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def print_markdown(text):
|
|
|
|
def print_markdown(text) -> None:
|
|
|
|
"""Prints a rich info message. Support Markdown syntax."""
|
|
|
|
"""Prints a rich info message. Support Markdown syntax."""
|
|
|
|
|
|
|
|
|
|
|
|
md = Padding(Markdown(text), 2)
|
|
|
|
md = Padding(Markdown(text), 2)
|
|
|
|
console.print(md)
|
|
|
|
console.print(md)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def print_step(text):
|
|
|
|
def print_step(text) -> None:
|
|
|
|
"""Prints a rich info message."""
|
|
|
|
"""Prints a rich info message."""
|
|
|
|
|
|
|
|
|
|
|
|
panel = Panel(Text(text, justify="left"))
|
|
|
|
panel = Panel(Text(text, justify="left"))
|
|
|
|
console.print(panel)
|
|
|
|
console.print(panel)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def print_table(items):
|
|
|
|
def print_table(items) -> None:
|
|
|
|
"""Prints items in a table."""
|
|
|
|
"""Prints items in a table."""
|
|
|
|
|
|
|
|
|
|
|
|
console.print(Columns([Panel(f"[yellow]{item}", expand=True) for item in items]))
|
|
|
|
console.print(Columns([Panel(f"[yellow]{item}", expand=True) for item in items]))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def print_substep(text, style=""):
|
|
|
|
def print_substep(text, style="") -> None:
|
|
|
|
"""Prints a rich info message without the panelling."""
|
|
|
|
"""Prints a rich colored info message without the panelling."""
|
|
|
|
console.print(text, style=style)
|
|
|
|
console.print(text, style=style)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|