diff --git a/src/electionguard_cli/print_utils.py b/src/electionguard_cli/print_utils.py index 948319b1..b582e365 100644 --- a/src/electionguard_cli/print_utils.py +++ b/src/electionguard_cli/print_utils.py @@ -1,10 +1,19 @@ import click -def Style(output: str): - click.style(output) +def print_header(text: str, header_color="green"): + click.echo("") + click.secho(f"{'-'*40}", fg=header_color) + click.echo(text, fg=header_color) + click.echo(f"{'-'*40}", header_color) -def Echo(output: str): - click.echo(output) +def print_message(text: str, underlined=False): + click.secho(f"{text}", fg="white", underline=underlined) -def Secho(text: str, fg=None, bg=None, bold=None, dim=None, underline=None, blink=None, reverse=None, reset=True): - click.secho(text, fg, bg, bold, dim, underline, blink, reverse, reset) \ No newline at end of file +def print_warning(text: str, warning_color="bright_red") -> None: + click.secho(f"WARNING: {text}", fg=warning_color, bold=True) + +def print_error(text: str, error_color="bright_red"): + click.secho(f"Error: {text}", fg=error_color, bold=True, italic=True) + +def cleanup(): + click.clear() \ No newline at end of file