Files
WheatlyBot/util/console.py

17 lines
484 B
Python

from rich.console import Console
from rich.progress import track
from rich.panel import Panel
console = Console()
def panel(title: str = '', content: str = '', style: str = "cyan") -> Panel:
"""
Create a panel with the given title and content.
"""
return Panel.fit(content, title=title, style=style)
def track_iterable(iterable, description: str):
"""
Create a progress bar for the given iterable.
"""
return track(iterable, description=description)