summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-12-17 00:09:15 +0100
committerJohannes Löthberg <johannes@kyriasis.com>2014-12-17 00:09:15 +0100
commit7809083195b58662a63850e8181fcebd9cad554f (patch)
tree623db439ea38bcbb6214efc1d504e4c4e214d60a
parentae89107640d13aba99bb5085bc52a49d59ef0a24 (diff)
downloadtodo-7809083195b58662a63850e8181fcebd9cad554f.tar.xz
todo: add colorization functions
-rwxr-xr-x[-rw-r--r--]todo16
1 files changed, 16 insertions, 0 deletions
diff --git a/todo b/todo
index fbe51eb..890213b 100644..100755
--- a/todo
+++ b/todo
@@ -55,6 +55,22 @@ def parse_args(args):
return config
+def color_bold(text):
+ color_string = '\x1b[1m{}\x1b[0m'
+ return color_string.format(text)
+
+def color_red(text):
+ color_string = '\x1b[38;2;250;050;050m{}\x1b[0m'
+ return color_string.format(text)
+
+def color_yellow(text):
+ color_string = '\x1b[38;2;250;150;050m{}\x1b[0m'
+ return color_string.format(text)
+
+def color_blue(text):
+ color_string = '\x1b[38;2;050;150;250m{}\x1b[0m'
+ return color_string.format(text)
+
def main():
arguments = docopt(__doc__, version='todo 0.0.1.alpha')
config = parse_args(arguments)