mirror of
https://github.com/onyx-and-iris/obsws-cli.git
synced 2026-04-18 06:53:38 +00:00
print colourless check/cross marks if NO_COLOR is set
patch bump
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
"""module contains utility functions for the obsws_cli package."""
|
||||
|
||||
import os
|
||||
|
||||
def snakecase_to_titlecase(snake_str):
|
||||
|
||||
def snakecase_to_titlecase(snake_str: str) -> str:
|
||||
"""Convert a snake_case string to a title case string."""
|
||||
return snake_str.replace('_', ' ').title()
|
||||
|
||||
|
||||
def check_mark(value: bool) -> str:
|
||||
"""Return a check mark or cross mark based on the boolean value."""
|
||||
if os.getenv('NO_COLOR') is not None:
|
||||
return '✓' if value else '✗'
|
||||
return '✅' if value else '❌'
|
||||
|
||||
Reference in New Issue
Block a user