X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tools%2Fqueue_rss.py;h=9fc5f429115dd24f1d95886de8b92e82c57d2a8c;hb=0e1df5636799153ae78c13d299b772b0654106c8;hp=ce72d65afd5e4fbaa2bba9d71ad8c7a7687c021b;hpb=341d9545f774cbc087fca66c1fe4fc2b82487290;p=dak.git diff --git a/tools/queue_rss.py b/tools/queue_rss.py index ce72d65a..9fc5f429 100755 --- a/tools/queue_rss.py +++ b/tools/queue_rss.py @@ -5,6 +5,7 @@ # Author: Filippo Giunchedi # Version: 0.4 +import cgi import os import os.path import cPickle @@ -17,8 +18,8 @@ import PyRSS2Gen from debian_bundle.deb822 import Changes -inrss_filename = "changes_in.rss" -outrss_filename = "changes_out.rss" +inrss_filename = "NEW_in.rss" +outrss_filename = "NEW_out.rss" db_filename = "status.db" parser = OptionParser() @@ -110,16 +111,19 @@ def add_rss_item(status, msg, direction): return False description = "
Description: %s\nChanges: %s\n
" % \ - (utf2ascii(msg['Description']), utf2ascii(msg['Changes'])) + (utf2ascii(cgi.escape(msg['Description'])), utf2ascii(cgi.escape(msg['Changes']))) + + link = "http://ftp-master.debian.org/new/%s_%s.html" % \ + (msg['Source'], msg['Version']) feed.items.insert(0, PyRSS2Gen.RSSItem( title, pubDate = pubdate, description = description, - author = utf2ascii(msg['Maintainer']), - link = "http://ftp-master.debian.org/new/%s_%s.html" % \ - (msg['Source'], msg['Version']) + author = utf2ascii(cgi.escape(msg['Maintainer'])), + link = link, + guid = link ) )