mirror of
https://github.com/onyx-and-iris/slobs-cli.git
synced 2025-08-06 20:11:44 +00:00
18 lines
528 B
Python
18 lines
528 B
Python
"""module for console output handling."""
|
|
|
|
import asyncclick as click
|
|
from rich.console import Console
|
|
|
|
out = Console()
|
|
err = Console(stderr=True, style='bold red')
|
|
|
|
|
|
def highlight(ctx: click.Context, text: str) -> str:
|
|
"""Highlight text for console output."""
|
|
return f'[{ctx.obj["style"].highlight}]{text}[/{ctx.obj["style"].highlight}]'
|
|
|
|
|
|
def warning(ctx: click.Context, text: str) -> str:
|
|
"""Format warning text for console output."""
|
|
return f'[{ctx.obj["style"].warning}]{text}[/{ctx.obj["style"].warning}]'
|