]> git.sommitrealweird.co.uk Git - rss2maildir.git/commitdiff
* Add item url to html parts
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sat, 22 Dec 2007 20:27:32 +0000 (20:27 +0000)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sat, 22 Dec 2007 20:27:32 +0000 (20:27 +0000)
rss2maildir.py

index c9a2cee8418f92202f833ec270748afb5dafdbad..97623535e64bc96bd118223d5c983c01a9a47e62 100755 (executable)
@@ -388,7 +388,12 @@ 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<p>Item URL: <a href='%s'>%s</a></p>" %( \
+            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()