[mhonarc] Add list of obsolete (removed) mailing lists
- From: Olav Vitters <ovitters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mhonarc] Add list of obsolete (removed) mailing lists
- Date: Wed, 17 Feb 2010 09:57:55 +0000 (UTC)
commit 2f65a190b79dafb03ea7c82bef6f94f1a8c33b2e
Author: Olav Vitters <olav bkor dhs org>
Date: Wed Feb 17 10:57:24 2010 +0100
Add list of obsolete (removed) mailing lists
They're either not archived anymore, or removed.
update-master | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/update-master b/update-master
index 0d09cf5..4479c39 100755
--- a/update-master
+++ b/update-master
@@ -19,6 +19,8 @@ from Mailman import MailList
from Mailman import Utils
from Mailman import Errors
from Mailman.i18n import _
+import glob
+import os.path
dirname = "/var/lib/mailman/archives/public"
@@ -30,8 +32,10 @@ names.sort()
vhost='gnome.org'
mlists = []
+all_mlists = set()
for n in names:
mlist = MailList.MailList(n, lock=0)
+ all_mlists.add(mlist.internal_name())
if not mlist.advertised:
continue
@@ -44,7 +48,8 @@ for n in names:
continue
mlists.append(mlist)
-
+archived_lists = set([os.path.basename(path) for path in glob.glob(os.path.join(dirname, '*')) if os.path.islink(path)])
+obsolete_mlists = archived_lists - all_mlists
INDEX=open("%s/index.html" % dirname, "w")
@@ -130,6 +135,15 @@ for list in mlists:
print >>INDEX, '<li><a href="%s/">%s</a></li>' % (list.internal_name(), list.internal_name())
print >>INDEX, "</ul>"
+if len(obsolete_mlists):
+ print >>INDEX, """Obsolete mailing lists:
+ <ul style="-moz-column-width: 30ex; -webkit-column-width: 30ex; column-width: 30ex">"""
+
+ for list in sorted(obsolete_mlists):
+ print >>INDEX, '<li><a href="%s/">%s</a></li>' % (list, list)
+
+ print >>INDEX, "</ul>"
+
print >>INDEX, """
<div id="footer">
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]