From 858150d88011af09bac9b0c7cb2c45190aa8574f Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 11 Mar 2012 18:55:25 +0000 Subject: docs: for db.utils --- alot/db/utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'alot/db') diff --git a/alot/db/utils.py b/alot/db/utils.py index 0b034da0..4e8ab904 100644 --- a/alot/db/utils.py +++ b/alot/db/utils.py @@ -16,6 +16,16 @@ from alot.helper import string_decode def extract_headers(mail, headers=None): + """ + returns subset of this messages headers as human-readable format: + all header values are decoded, the resulting string has + one line "KEY: VALUE" for each requested header present in the mail. + + :param mail: the mail to use + :type mail: :class:`email.Message` + :param headers: headers to extract + :type headers: list of str + """ headertext = u'' if headers == None: headers = mail.keys() -- cgit v1.2.3