Initial commit
This commit is contained in:
commit
ce14eff286
14 files changed
+377
No files matched your search
@@ -0,0 +1,26 @@
|
||||
from rich.console import Console
|
||||
from rich.markdown import Markdown
|
||||
from rich.padding import Padding
|
||||
from rich.panel import Panel
|
||||
from rich.text import Text
|
||||
|
||||
console = Console()
|
||||
|
||||
|
||||
def print_markdown(text):
|
||||
"""Prints a rich info message. Support Markdown syntax."""
|
||||
|
||||
md = Padding(Markdown(text), 2)
|
||||
console.print(md)
|
||||
|
||||
|
||||
def print_step(text):
|
||||
"""Prints a rich info message."""
|
||||
|
||||
panel = Panel(Text(text, justify="left"))
|
||||
console.print(panel)
|
||||
|
||||
|
||||
def print_substep(text, style=""):
|
||||
"""Prints a rich info message without the panelling."""
|
||||
console.print(text, style=style)
|
||||
Reference in new issue
Block a user