Alot sets up a SettingsManager to access user settings defined in different places uniformly. There are four types of user settings:
what? | location | accessible via |
---|---|---|
alot config | ~/.config/alot/config or given by command option -c. | SettingsManager.get() |
hooks – user provided python code | ~/.config/alot/hooks.py or as given by the hooksfile config value | SettingsManager.get_hook() |
notmuch config | ~/.notmuchrc or given by command option -n | SettingsManager.get_notmuch_setting() |
mailcap – defines shellcommands to handle mime types | ~/.mailcap (/etc/mailcap) | SettingsManager.mailcap_find_match() |
Organizes user settings
Parameters: |
---|
look up global config values from alot’s config
Parameters: | |
---|---|
Returns: | config value with type as specified in the spec-file |
returns Account for a given email address (str)
Parameters: | address (string) – address to look up |
---|---|
Return type: | Account or None |
returns known accounts
Return type: | list of Account |
---|
returns list of all defined AddressBook objects
returns addresses of known accounts including all their aliases
return hook (callable) identified by key
look up keybinding from MODE-maps sections
Parameters: | |
---|---|
Returns: | a command line to be applied upon keypress |
Return type: | str |
look up keybindings from MODE-maps sections
Parameters: | mode (str) – mode identifier |
---|---|
Returns: | dictionaries of key-cmd for global and specific mode |
Return type: | 2-tuple of dicts |
returns addresses of known accounts without its aliases
look up config values from notmuch’s config
Parameters: | |
---|---|
Returns: | config value with type as specified in the spec-file |
looks up user’s preferred way to represent a given tagstring.
Parameters: |
|
---|
If onebelow_normal or onebelow_focus is given these attributes will be used as fallbacks for fg/bg values ‘’ and ‘default’.
normal: | to urwid.AttrSpec used if unfocussed |
---|---|
focussed: | to urwid.AttrSpec used if focussed |
translated: | to an alternative string representation |
looks up theming attribute
Parameters: | |
---|---|
Return type: | urwid.AttrSpec |
looks up theming info a threadline displaying a given thread. This wraps around get_threadline_theming(), filling in the current colour mode.
Parameters: | thread (alot.db.thread.Thread) – thread to theme |
---|
Propagates mailcap.find_match() but caches the mailcap (first argument)
parse alot’s config file from path
parse notmuch’s config file from path
turns a given datetime obj into a unicode string representation. This will:
get a (validated) config object for given config file path.
Parameters: |
|
---|---|
Raises: | |
Return type: | configobj.ConfigObj |
replace ‘’ and ‘default’ by fallback values
Colour theme
Parameters: | path (str) – path to theme file |
---|---|
Raises: | ConfigError |
returns requested attribute
Parameters: | |
---|---|
Return type: | urwid.AttrSpec |
look up how to display a Threadline wiidget in search mode for a given thread.
Parameters: |
|
---|
normal: | to urwid.AttrSpec, |
---|---|
focus: | to urwid.AttrSpec, |
parts: | to a list of strings indentifying subwidgets to be displayed in this order. |
normal: | to urwid.AttrSpec, |
---|---|
focus: | to urwid.AttrSpec, |
width: | to a tuple indicating the width of the subpart. This is either (‘fit’, min, max) to force the widget to be at least min and at most max characters wide, or (‘weight’, n) which makes it share remaining space with other ‘weight’ parts. |
alignment: | where to place the content if shorter than the widget. This is either ‘right’, ‘left’ or ‘center’. |
Datastructure that represents an email account. It manages this account’s settings, can send and store mails to maildirs (drafts/send).
Note
This is an abstract class that leaves send_mail() unspecified. See SendmailAccount for a subclass that uses a sendmail command to send out mails.
return all email addresses connected to this account, in order of their importance
sends given mail
Parameters: | mail (email.message.Message or string) – the mail to send |
---|---|
Returns: | a Deferred that errs back with a class:SendingMailFailed, containing a reason string if an error occured. |
stores mail (email.message.Message or str) as draft if draft_box is set.
stores given mail in mailbox. If mailbox is maildir, set the S-flag and return path to newly added mail. Oherwise this will return None.
Parameters: |
|
---|---|
Returns: | absolute path of mail-file for Maildir or None if mail was successfully stored |
Return type: | str or None |
Raises: | StoreMailError |
stores mail (email.message.Message or str) in send-store if sent_box is set.
addressbook (addressbooks.AddressBook) managing this accounts contacts
this accounts main email address
list of alternative addresses
gpg fingerprint for this account’s private key
real name used to format from-headers
signature to append to outgoing mails
attach signature file instead of appending its content to body text
filename of signature file in attachment
can look up email addresses and realnames for contacts.
Note
This is an abstract class that leaves get_contacts() unspecified. See AbookAddressBook and MatchSdtoutAddressbook for implementations.
list all contacts tuples in this abook as (name, email) tuples
looks up all contacts where name or address match query
AddressBook that parses a shell command’s output for lookups
Parameters: |
---|
AddressBook that parses abook’s config/database files
Parameters: | path (str) – path to theme file |
---|