euporie.core.log.Style

class euporie.core.log.Style(style_rules: list[tuple[str, str]])

Create a Style instance from a list of style rules.

The style_rules is supposed to be a list of (‘classnames’, ‘style’) tuples. The classnames are a whitespace separated string of class names and the style string is just like a Pygments style definition, but with a few additions: it supports ‘reverse’ and ‘blink’.

Later rules always override previous rules.

Usage:

Style([
    ('title', '#ff0000 bold underline'),
    ('something-else', 'reverse'),
    ('class1 class2', 'reverse'),
])

The from_dict classmethod is similar, but takes a dictionary as input.