colout/colout/colout_ninja.py
nojhan 9fd0df9963 Separated Ninja theme with correct handling of scale
Add a flag for user defined colormaps in the context.
Do not overload the colormap if the user changed it.
Inherit the Ninja theme from the cmake one.
Explanations about themes in the README.
2014-05-02 19:30:26 +02:00

19 lines
525 B
Python

import colout_cmake
def theme(context):
# Ninja theme
# Inherit from the CMake theme
context,th = colout_cmake.theme(context)
# Because Ninja note progress as a fraction, we do not want the scale of a percentage
context["scale"] = (0,1)
# Link (ninja)
th.append( [ "^\[[0-9/]+\]\s?(Linking .* )(library|executable) (.*/)*(.+(\.[aso]+)*)$",
"blue", "normal,normal,bold" ] )
# progress percentage (ninja)
th.append( [ "^(\[[0-9]+/[0-9]+\])","Scale" ] )
return context,th