X-Git-Url: https://git.sommitrealweird.co.uk/rss2maildir.git/blobdiff_plain/1b8977fade98b0903f4f68cdfba1382a2f4a377a..f8d24fa18a94f935fea43089ecc3eb68f916c2f8:/rss2maildir.py diff --git a/rss2maildir.py b/rss2maildir.py index 6dad334..9762353 100755 --- a/rss2maildir.py +++ b/rss2maildir.py @@ -388,10 +388,18 @@ def parse_and_deliver(maildir, url, statedir): msg.add_header("Subject", item["title"]) msg.set_default_type("text/plain") - htmlpart = MIMEText(content.encode("utf-8"), "html", "utf-8") + htmlcontent = content.encode("utf-8") + htmlcontent = "%s\n\n
Item URL: %s
" %( \ + content, \ + item["link"], \ + item["link"] ) + htmlpart = MIMEText(htmlcontent.encode("utf-8"), "html", "utf-8") textparser = HTML2Text() textparser.feed(content.encode("utf-8")) textcontent = textparser.gettext() + textcontent = "%s\n\nItem URL: %s" %( \ + textcontent, \ + item["link"] ) textpart = MIMEText(textcontent.encode("utf-8"), "plain", "utf-8") msg.attach(textpart) msg.attach(htmlpart)