You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RedditVideoMakerBot/utils/console.py

28 lines
619 B

#!/usr/bin/env python3
3 years ago
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."""
3 years ago
md = Padding(Markdown(text), 2)
console.print(md)
3 years ago
def print_step(text):
"""Prints a rich info message."""
3 years ago
panel = Panel(Text(text, justify="left"))
console.print(panel)
3 years ago
def print_substep(text, style=""):
"""Prints a rich info message without the panelling."""
console.print(text, style=style)