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

More formatting options.

parent 8165c2e3
......@@ -23,12 +23,6 @@
# along with engine. If not, see <http://www.gnu.org/licenses/>.
#
# Meta
__version__ = '0.0.1'
__license__ = "GNU General Public License (GPL) Version 3"
__version_info__ = (0, 0, 1)
__author__ = 'David Trattnig <david.trattnig@subsquare.at>'
import datetime
import time
......@@ -60,18 +54,6 @@ class EngineUtil:
if uri.startswith("live") or uri.startswith("linein"):
return ChannelType.LIVE
# FIXME Mix of channels and channel-types!!!
# if source == "0":
# return Channel.LIVE_0
# elif source == "1":
# return Channel.LIVE_1
# elif source == "2":
# return Channel.LIVE_2
# elif source == "3":
# return Channel.LIVE_3
# elif source == "4":
# return Channel.LIVE_4
@staticmethod
def lqs_annotate_cuein(uri, cue_in):
......@@ -157,9 +139,29 @@ class SimpleUtil:
"""
result = ""
for c in str(text):
result += c + '\u0336'
result += c + TerminalColors.STRIKE.value
return result
@staticmethod
def bold(text):
"""
Creates a bold version of the given text.
"""
return TerminalColors.BOLD.value + text + TerminalColors.ENDC.value
@staticmethod
def underline(text):
"""
Creates a underlined version of the given text.
"""
return TerminalColors.UNDERLINE.value + text + TerminalColors.ENDC.value
@staticmethod
def blue(text):
"""
Creates a blue version of the given text.
"""
return TerminalColors.BLUE.value + text + TerminalColors.ENDC.value
@staticmethod
def red(text):
......@@ -168,7 +170,6 @@ class SimpleUtil:
"""
return TerminalColors.RED.value + text + TerminalColors.ENDC.value
@staticmethod
def pink(text):
"""
......@@ -176,6 +177,12 @@ class SimpleUtil:
"""
return TerminalColors.PINK.value + text + TerminalColors.ENDC.value
@staticmethod
def yellow(text):
"""
Creates a yellow version of the given text.
"""
return TerminalColors.YELLOW.value + text + TerminalColors.ENDC.value
@staticmethod
def green(text):
......@@ -184,6 +191,12 @@ class SimpleUtil:
"""
return TerminalColors.GREEN.value + text + TerminalColors.ENDC.value
@staticmethod
def cyan(text):
"""
Creates a cyan version of the given text.
"""
return TerminalColors.CYAN.value + text + TerminalColors.ENDC.value
......@@ -196,7 +209,7 @@ class TerminalColors(Enum):
RED = "\033[31m"
GREEN = "\033[32m"
ORANGE = "\033[33m"
YELLOW = "\033[33m"
BLUE = "\033[34m"
PINK = "\033[35m"
CYAN = "\033[36m"
......@@ -206,5 +219,6 @@ class TerminalColors(Enum):
BOLD = "\033[1m"
UNDERLINE = "\033[4m"
STRIKE = "\u0336"
ENDC = "\033[0m"
\ No newline at end of file
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