Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine
Commits
b72496d1
Commit
b72496d1
authored
5 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
LQS annotation util, color formatters.
parent
746649c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/base/utils.py
+33
-0
33 additions, 0 deletions
modules/base/utils.py
with
33 additions
and
0 deletions
modules/base/utils.py
+
33
−
0
View file @
b72496d1
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment