changeset 36:ec341fb94853

Filter out notification mails on the front page.
author Martin Geisler <mg@daimi.au.dk>
date Wed, 20 Feb 2008 13:00:49 +0100
parents 97ebcb1bb4e0
children dfe399e0b67e
files update_news.py
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/update_news.py	Tue Feb 19 14:06:52 2008 +0100
+++ b/update_news.py	Wed Feb 20 13:00:49 2008 +0100
@@ -109,12 +109,15 @@
     #tip_age = age(repository_data.entries[0].updated_parsed)
     #now = strftime("%Y-%m-%d %H:%M UTC", gmtime())
 
+    repository_entries = repository_data.entries[:4]
+    viff_devel_entries = [e for e in viff_devel_data.entries
+                          if e.author != "viff-devel< at >viff.dk"][:4]
+
     logging.info("Rendering news.html")
     loader = TemplateLoader(['.'])
     tmpl = loader.load('news.xml')
-    stream = tmpl.generate(repository=repository_data.entries[:4],
-                           viff_devel=viff_devel_data.entries[:4])
-
+    stream = tmpl.generate(repository=repository_entries,
+                           viff_devel=viff_devel_entries)
     out = open('_news.html', 'w')
     out.write(stream.render('html'))
     out.close()