# HG changeset patch # User Malcolm Matalka # Date 1634568177 -7200 # Mon Oct 18 16:42:57 2021 +0200 # Node ID 86de7b3acfb28bb4c11e6334c3812d73da390896 # Parent b5310e727ffd098be718590ac85a474cdf1ad368 Add content_type. Does not quite work in that the output is not properly formatted diff --git a/feed2maildir/converter.py b/feed2maildir/converter.py --- a/feed2maildir/converter.py +++ b/feed2maildir/converter.py @@ -62,7 +62,7 @@ Date: {} Subject: {} List-ID: {} -Content-Type: text/plain +Content-Type: {} {} @@ -193,6 +193,7 @@ updated = updated.strftime('%a, %d %b %Y %H:%M:%S %Z') desc = '' + content_type = 'text/plain' if not self.links: if self.strip: stripper = HTMLStripper() @@ -200,9 +201,11 @@ desc = stripper.get_data() else: desc = post.description + content_type = 'text/html' return self.TEMPLATE.format(updated, post.title, title.lower().replace(' ', '-'), + content_type, post.link, desc)