1 Feb 2005 06:34
svn commit: samba-web r538 - in trunk/scripts: .
<deryck <at> samba.org>
2005-02-01 05:34:21 GMT
2005-02-01 05:34:21 GMT
Author: deryck Date: 2005-02-01 05:34:21 +0000 (Tue, 01 Feb 2005) New Revision: 538 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=538 Log: Search for the html formatted date when testing for existing dates on news.samba.org pages. This fixes a bug in my news script that was grouping older posts in odd pairs and under incorrect dates. deryck Modified: trunk/scripts/updateNews.py Changeset: Modified: trunk/scripts/updateNews.py =================================================================== --- trunk/scripts/updateNews.py 2005-01-31 19:28:22 UTC (rev 537) +++ trunk/scripts/updateNews.py 2005-02-01 05:34:21 UTC (rev 538) <at> <at> -85,7 +85,7 <at> <at> news_text = all_stories[date] h2date = date_to_str(time.gmtime(date)[:3]) index = open('index.html', 'a') - if open('index.html', 'r').read().find(h2date) > -1: + if open('index.html', 'r').read().find('<h2>' + h2date + '</h2>\n\n') >= 0: index.write(news_text) else: index.write('<h2>' + h2date + '</h2>\n\n') <at> <at> -127,7 +127,7 <at> <at> news_text = "".join(stories_by_date[date]) h2date = date_to_str(time.gmtime(date)[:3]) index = open('index.html', 'a') - if open('index.html', 'r').read().find(h2date) > -1: + if open('index.html', 'r').read().find('<h2>' + h2date + '</h2>\n\n') >= 0: index.write(news_text) else: index.write('<h2>' + h2date + '</h2>\n\n')
RSS Feed