Download latest PDF - Read the Docs

Transcript
alot Documentation, Release 0.3.6
4.5.3 Utils
alot.settings.utils.read_config(configpath=None, specpath=None, checks={})
get a (validated) config object for given config file path.
Parameters
• configpath (str) – path to config-file
• specpath (str) – path to spec-file
• checks (dict str->callable,) – custom checks to use for validator. see validate docs
Raises ConfigError
Return type configobj.ConfigObj
alot.settings.utils.resolve_att(a, fallback)
replace ‘’ and ‘default’ by fallback values
4.5.4 Themes
class alot.settings.theme.Theme(path)
Colour theme
Parameters path (str) – path to theme file
Raises ConfigError
get_attribute(colourmode, mode, name, part=None)
returns requested attribute
Parameters
• mode (str) – ui-mode (e.g. search,‘thread‘...)
• name (str) – of the atttribute
• colourmode (int) – colour mode; in [1, 16, 256]
Return type urwid.AttrSpec
get_threadline_theming(thread, colourmode)
look up how to display a Threadline wiidget in search mode for a given thread.
Parameters
• thread (alot.db.thread.Thread) – Thread to theme Threadline for
• colourmode (int) – colourmode to use, one of 1,16,256.
This will return a dict mapping
normal to urwid.AttrSpec,
focus to urwid.AttrSpec,
parts to a list of strings indentifying subwidgets to be displayed in this order.
Moreover, for every part listed this will map ‘part’ to a dict mapping
normal to urwid.AttrSpec,
focus to urwid.AttrSpec,
58
Chapter 4. API and Development