From 912802597394169c9ea9b969e154a1c85fffed91 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 3 Jun 2016 10:25:09 +0200 Subject: [PATCH] More themes --- colout/colout_clang.py | 1 + colout/colout_configure.py | 13 +++++++++++++ colout/colout_ctest.py | 17 +++++++++++++++++ colout/colout_g++.py | 3 ++- colout/colout_latex.py | 5 ++++- 5 files changed, 37 insertions(+), 2 deletions(-) create mode 120000 colout/colout_clang.py create mode 100644 colout/colout_configure.py create mode 100644 colout/colout_ctest.py diff --git a/colout/colout_clang.py b/colout/colout_clang.py new file mode 120000 index 0000000..2df53b5 --- /dev/null +++ b/colout/colout_clang.py @@ -0,0 +1 @@ +colout_g++.py \ No newline at end of file diff --git a/colout/colout_configure.py b/colout/colout_configure.py new file mode 100644 index 0000000..4d50e96 --- /dev/null +++ b/colout/colout_configure.py @@ -0,0 +1,13 @@ +#encoding: utf-8 + +def theme(context): + + return context, [ + ["^(checking .*)(yes|found|ok)$","green", "normal,bold"], + ["^(checking .*)(no|none)$", "yellow", "normal,bold"], + ["^(configure:) (error:)(.*)", "red","normal,bold"], + ["^(configure:)(.*)", "magenta","normal,bold"], + ["^(checking .*)", "blue",""], + ["^(config.status:) (creating )(.*)", "cyan,blue","normal,normal,bold"], + ["^(config.status:) (executing )(.*)", "cyan,green","normal,normal,bold"], + ] diff --git a/colout/colout_ctest.py b/colout/colout_ctest.py new file mode 100644 index 0000000..d23d2bc --- /dev/null +++ b/colout/colout_ctest.py @@ -0,0 +1,17 @@ + +def theme(context): + # CTest theme: + passed="green" + notpassed="red" + + # If the user do not ask for his own colormap + # if not context["user_defined_colormaps"]: + # # A palette that goes: purple, orange, white + # percs = [45, 39, 33, 27, 21, 57, 63, 62, 98, 97, 133, 132, 138, 173, 172, 208, 214, 220, 226, 228, 229, 230, 231, 255] + # context["colormaps"]["Scale"] = percs + + return context,[ + # Passed + [ "^\s*[0-9]+/[0-9]+ Test\s+#[0-9]+: (.*)\s+\.+\s+(Passed)", passed], + [ "^\s*[0-9]+/[0-9]+ Test\s+#[0-9]+: (.*)\s+\.+(\*{3}.*)\s+.*", notpassed] + ] diff --git a/colout/colout_g++.py b/colout/colout_g++.py index 848569f..cb9764f 100644 --- a/colout/colout_g++.py +++ b/colout/colout_g++.py @@ -76,7 +76,8 @@ def theme(context): [ qo+"(.*?)"+qc, "Cpp", "monokai" ], # source code after a "note: candidate are/is:" - [ _("note: ")+"((?!.*(candidate|"+qo+"|"+qc+")).*)$", "Cpp", "monokai" ], + [ _("note: ")+"((?!.*("+qo+"|"+qc+")).*)$", "Cpp", "monokai" ], + # [ _("note: ")+"(candidate:)(.*)$", "green,Cpp", "normal,monokai" ], # after the code part, to avoid matching ANSI escape chars [ _("note: "), "green", "normal" ] ] diff --git a/colout/colout_latex.py b/colout/colout_latex.py index cc6210e..c19287f 100644 --- a/colout/colout_latex.py +++ b/colout/colout_latex.py @@ -6,13 +6,16 @@ def theme(context): ["(LaTeX Warning): (.*) `(.*)' on page [0-9] (.*) on input line [0-9]+.$", "magenta,magenta,white,magenta", "normal,bold,normal" ], ["(LaTeX Warning): (.*)", "magenta", "normal,bold" ], + ["(LaTeX Error): (.*)", "red", "normal,bold" ], + ["^(.*\.tex):([0-9]+): (.*)", "white,yellow,red", "normal,normal,bold" ], # ["on (page [0-9]+)", "yellow", "normal" ], ["on input (line [0-9]+)", "yellow", "normal" ], ["^! .*$", "red", "bold"], ["(.*erfull) ([^\s]+).* in [^\s]+ at (lines [0-9]+--[0-9]+)", "magenta,magenta,yellow", "normal"], ["\\[^\s]+\s", "white", "bold"], - ["^l\.([0-9]+) ", "yellow"], + ["^l\.([0-9]+) (.*)", "yellow,tex"], + ["^\s+(.*)", "tex"], ["(Output written on) (.*) \(([0-9]+ pages), [0-9]+ bytes\).", "blue,white,blue", "normal,bold,normal"], ["WARNING.*", "magenta", "normal"],