Author: deryck Date: 2005-07-22 20:02:52 +0000 (Fri, 22 Jul 2005) New Revision: 757
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=757 Log: Add pubDate to RSS feed for news. deryck Modified: trunk/scripts/updateNews.py Changeset: Modified: trunk/scripts/updateNews.py =================================================================== --- trunk/scripts/updateNews.py 2005-07-22 18:46:17 UTC (rev 756) +++ trunk/scripts/updateNews.py 2005-07-22 20:02:52 UTC (rev 757) @@ -219,6 +219,7 @@ title = re.search('(?<=\"\>).+(?=\<\/a)', item_text) text = re.search('<div class=\"article\"\>(\s|.)*?</div>', item_text) link = re.search('(?<=\<div class=\"reference\">Link: \<a href=\"/samba/news/).+(?=\"\>)', item_text) + pub_date = time.asctime(time.gmtime(date)) # Drop end tag unless nested divs were used if text.group()[21:].find('<div') > 0: @@ -230,6 +231,7 @@ feed.write('<title><![CDATA[' + title.group() + ']]></title>\n') feed.write('<description><![CDATA[' + description + ']]></description>\n') feed.write('<link>http://news.samba.org/' + link.group() + '</link>\n') + feed.write('<pubDate>' + pub_date + '</pubDate>') feed.write('</item>\n\n') count = count - 1