Commit b72496d1 authored by David Trattnig's avatar David Trattnig
Browse files

LQS annotation util, color formatters.

parent 746649c4
......@@ -73,6 +73,22 @@ class EngineUtil:
# return Channel.LIVE_4
@staticmethod
def lqs_annotate_cuein(uri, cue_in):
"""
Wraps the given URI with a Liquidsoap Cue In annotation.
Args:
uri (String): The path to the audio source
cue_in (Float): The value in seconds wher the cue in should start
Returns:
(String): The annotated URI
"""
if cue_in > 0.0:
uri = "annotate:liq_cue_in=\"%s\":%s" % (str(cue_in), uri)
return uri
class SimpleUtil:
"""
......@@ -126,6 +142,23 @@ class SimpleUtil:
return result
@staticmethod
def red(text):
"""
Creates a red version of the given text.
"""
return TerminalColors.Red + text + TerminalColors.ENDC
@staticmethod
def pink(text):
"""
Creates a red version of the given text.
"""
return TerminalColors.PINK.value + text + TerminalColors.ENDC.value
class TerminalColors(Enum):
"""
Colors for formatting terminal output.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment