X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=blobdiff_plain;f=tools%2Fqueue_rss.py;h=fd49c0dfe1f0173a7c0fd343e7ed37a1af5cd9bc;hp=fc1ad3deb0f1c57d7bc02d4db6b6b375f474a807;hb=HEAD;hpb=27e00376e81d1c37ff327ee0d39670b266418869 diff --git a/tools/queue_rss.py b/tools/queue_rss.py index fc1ad3de..fd49c0df 100755 --- a/tools/queue_rss.py +++ b/tools/queue_rss.py @@ -14,6 +14,7 @@ import sys import time from optparse import OptionParser from datetime import datetime +from email.utils import parseaddr import PyRSS2Gen @@ -42,12 +43,12 @@ class Status: def __init__(self): self.feed_in = PyRSS2Gen.RSS2( title = "Packages entering NEW", - link = "http://ftp-master.debian.org/new.html", + link = "https://ftp-master.debian.org/new.html", description = "Debian packages entering the NEW queue" ) self.feed_out = PyRSS2Gen.RSS2( title = "Packages leaving NEW", - link = "http://ftp-master.debian.org/new.html", + link = "https://ftp-master.debian.org/new.html", description = "Debian packages leaving the NEW queue" ) self.queue = {} @@ -138,15 +139,18 @@ def add_rss_item(status, msg, direction): (cgi.escape(msg['Description']), cgi.escape(msg['Changes'])) - link = "http://ftp-master.debian.org/new/%s_%s.html" % \ + link = "https://ftp-master.debian.org/new/%s_%s.html" % \ (msg['Source'], msg['Version']) + maintainer = parseaddr(msg['Maintainer']) + author = "%s (%s)" % (maintainer[1], maintainer[0]) + feed.items.insert(0, PyRSS2Gen.RSSItem( title, pubDate = pubdate, description = description, - author = cgi.escape(msg['Maintainer']), + author = cgi.escape(author), link = link, guid = link )