From fb17979cb0c9de52e9fc45bea3e020e0372550bf Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 21 Jun 2025 23:39:13 +0100 Subject: [PATCH] add highlight helper function --- obsws_cli/console.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/obsws_cli/console.py b/obsws_cli/console.py index a93ecb5..abaef64 100644 --- a/obsws_cli/console.py +++ b/obsws_cli/console.py @@ -1,6 +1,12 @@ """module for console output handling in obsws_cli.""" +import typer from rich.console import Console out = Console() err = Console(stderr=True, style='bold red') + + +def highlight(ctx: typer.Context, text: str) -> str: + """Highlight text using the current context's style.""" + return f'[{ctx.obj["style"].highlight}]{text}[/{ctx.obj["style"].highlight}]'