Re: [Mailman-Users] patch to add date to each meassge in mail archiveIndex

2005-09-13 Thread Matt Ryanczak
I submitted this patch to the sourceforge mailman site so it can now be
found there. I also updated the patch so that it will now update every
template (not just the English version). For convenience the patch is
also below (and attached to keep the proper breaks in some of the
template files)...

Regards,

-- 
Matt Ryanczak
American Registry for Internet Numbers
Lead System Administrator




--- mailman-2.1.6/Mailman/Archiver/HyperArch.py 2005-05-13 07:35:37.0 
-0400
+++ mailman-2.1.6/Mailman/Archiver/HyperArch.py 2005-09-12 18:41:06.0 
-0400
@@ -1024,6 +1024,7 @@
 def write_index_entry(self, article):
 subject = self.get_header(subject, article)
 author = self.get_header(author, article)
+datestr = self.get_header(datestr, article)
 if mm_cfg.ARCHIVER_OBSCURES_EMAILADDRS:
 try:
 author = re.sub('@', _(' at '), author)
@@ -1032,12 +1033,14 @@
 pass
 subject = CGIescape(subject, self.lang)
 author = CGIescape(author, self.lang)
+datestr = CGIescape(datestr, self.lang)
 
 d = {
 'filename': urllib.quote(article.filename),
 'subject':  subject,
 'sequence': article.sequence,
-'author':   author
+'author':   author,
+'datestr':  datestr
 }
 print quick_maketext(
 'archidxentry.html', d,
--- mailman-2.1.6/templates/ca/archidxentry.html2003-11-01 
10:51:48.0 -0500
+++ mailman-2.1.6/templates/ca/archidxentry.html2005-09-13 
12:46:07.0 -0400
@@ -1,4 +1,4 @@
-LIA HREF=%(filename)s%(subject)s
+LI%(datestr)snbsp;A HREF=%(filename)s%(subject)s
 /AA NAME=%(sequence)inbsp;/A
 I%(author)s
 /I
--- mailman-2.1.6/templates/en/archidxentry.html2002-10-08 
12:50:41.0 -0400
+++ mailman-2.1.6/templates/en/archidxentry.html2005-09-13 
12:44:40.0 -0400
@@ -1,4 +1,4 @@
-LIA HREF=%(filename)s%(subject)s
+LI%(datestr)snbsp;%(datestr)snbsp;A HREF=%(filename)s%(subject)s
 /AA NAME=%(sequence)inbsp;/A
 I%(author)s
 /I
--- mailman-2.1.6/templates/es/archidxentry.html2005-05-20 
09:28:23.0 -0400
+++ mailman-2.1.6/templates/es/archidxentry.html2005-09-13 
12:46:21.0 -0400
@@ -1,4 +1,4 @@
-LIA HREF=%(filename)s%(subject)s
+LI%(datestr)snbsp;A HREF=%(filename)s%(subject)s
 /AA NAME=%(sequence)inbsp;/A
 I%(author)s
 /I
--- mailman-2.1.6/templates/eu/archidxentry.html2003-12-01 
11:07:41.0 -0500
+++ mailman-2.1.6/templates/eu/archidxentry.html2005-09-13 
12:45:48.0 -0400
@@ -1,4 +1,4 @@
-LIA HREF=%(filename)s%(subject)s
+LI%(datestr)snbsp;A HREF=%(filename)s%(subject)s
 /AA NAME=%(sequence)inbsp;/A
 I%(author)s
 /I
--- mailman-2.1.6/templates/fr/archidxentry.html2002-12-19 
23:06:08.0 -0500
+++ mailman-2.1.6/templates/fr/archidxentry.html2005-09-13 
12:46:16.0 -0400
@@ -1,4 +1,4 @@
-lia href=%(filename)s%(subject)s 
+li%(datestr)snbsp;a href=%(filename)s%(subject)s 
 /aa name=%(sequence)inbsp;/a
  i%(author)s 
 /i/li
--- mailman-2.1.6/templates/hr/archidxentry.html2003-11-30 
18:04:02.0 -0500
+++ mailman-2.1.6/templates/hr/archidxentry.html2005-09-13 
12:44:50.0 -0400
@@ -1,4 +1,4 @@
-LIA HREF=%(filename)s%(subject)s
+LI%(datestr)snbsp;A HREF=%(filename)s%(subject)s
 /AA NAME=%(sequence)inbsp;/A
 I%(author)s
 /I
--- mailman-2.1.6/templates/hu/archidxentry.html2002-12-11 
22:30:15.0 -0500
+++ mailman-2.1.6/templates/hu/archidxentry.html2005-09-13 
12:44:58.0 -0400
@@ -1,4 +1,4 @@
-LIA HREF=%(filename)s%(subject)s
+LI%(datestr)snbsp;A HREF=%(filename)s%(subject)s
 /AA NAME=%(sequence)inbsp;/A
 I%(author)s
 /I
--- mailman-2.1.6/templates/it/archidxentry.html2002-10-10 
15:33:47.0 -0400
+++ mailman-2.1.6/templates/it/archidxentry.html2005-09-13 
12:45:35.0 -0400
@@ -1,4 +1,4 @@
-LIA HREF=%(filename)s%(subject)s
+LI%(datestr)snbsp;A HREF=%(filename)s%(subject)s
 /AA NAME=%(sequence)inbsp;/A
 I%(author)s
 /I
--- mailman-2.1.6/templates/ja/archidxentry.html2002-10-08 
12:50:42.0 -0400
+++ mailman-2.1.6/templates/ja/archidxentry.html2005-09-13 
12:45:27.0 -0400
@@ -1,4 +1,4 @@
-LIA HREF=%(filename)s%(subject)s
+LI%(datestr)snbsp;A HREF=%(filename)s%(subject)s
 /AA NAME=%(sequence)inbsp;/A
 I%(author)s
 /I
--- mailman-2.1.6/templates/lt/archidxentry.html2002-12-24 
14:05:13.0 -0500
+++ mailman-2.1.6/templates/lt/archidxentry.html2005-09-13 
12:45:09.0 -0400
@@ -1,4 +1,4 @@
-LIA HREF=%(filename)s%(subject)s
+LI%(datestr)snbsp;A HREF=%(filename)s%(subject)s
 /AA NAME=%(sequence)inbsp;/A
 I%(author)s
 /I
--- mailman-2.1.6/templates/pl/archidxentry.html2003-04-20 
00:52:59.0 -0400
+++ mailman-2.1.6/templates/pl/archidxentry.html2005-09-13 
12:45:40.0 -0400
@@ -1,4 +1,4 @@
-LIA 

Re: [Mailman-Users] patch to add date to each meassge in mail archiveIndex

2005-09-12 Thread Mark Sapiro
Matt Ryanczak wrote:

I was asked to make the date for each message in a mailman archive be
visible in the index for that month. This required that I modify
HyperArch.py and the template file archidxentry.html. I thought others
might find this useful so here are the relevant patches for the
mailman-2.1.6 source tree. 

I apologize if this is a duplication of someone else efforts, I searched
around and could not find a way to do this in mailman as it was or a
patch to do the same.

Thanks for developing this patch. It would help for tracking and
possible adoption into the base if you would submit it to the Mailman
patch tracker at
http://sourceforge.net/tracker/?group_id=103atid=300103

You might also add a note to the RFE at
http://sourceforge.net/tracker/index.php?func=detailaid=843141group_id=103atid=350103

--
Mark Sapiro [EMAIL PROTECTED]   The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp


Re: [Mailman-Users] patch to add date to each meassge in mail archiveIndex

2005-09-12 Thread Andrew Smith
I was looking for a solution to put the date available in the archives.
I have completed the patch as described and get an error when I rebuild
my archives
- - - 
File /opt/mailman/Mailman/Archiver/HyperArch.py, line 1005, in
write_index_entry
datestr = self.get_header(datestr, article)
  File /opt/mailman/Mailman/Archiver/HyperArch.py, line 1027, in
get_header
return getattr(article, field)
AttributeError: Article instance has no attribute 'datestr'
- - -

Anyone able to help me with this?

---
Andrew Smith
Web Developer
Tyndale University College  Seminary
416-226-6620 (2714)
--
[EMAIL PROTECTED]
http://www.tyndale.ca
http://www.tyndale.ca/it
http://www.tyndale.ca/~asmith
--
25 Ballyconnor Court
Toronto, Ontario.
M2M 4B3
--
Tyndale's Mission is to educate and equip Christians to serve the
world with passion for Jesus Christ.
---

 Mark Sapiro [EMAIL PROTECTED] 9/12/2005 2:06:52 PM 
Matt Ryanczak wrote:

I was asked to make the date for each message in a mailman archive be
visible in the index for that month. This required that I modify
HyperArch.py and the template file archidxentry.html. I thought
others
might find this useful so here are the relevant patches for the
mailman-2.1.6 source tree. 

I apologize if this is a duplication of someone else efforts, I
searched
around and could not find a way to do this in mailman as it was or a
patch to do the same.

Thanks for developing this patch. It would help for tracking and
possible adoption into the base if you would submit it to the Mailman
patch tracker at
http://sourceforge.net/tracker/?group_id=103atid=300103 

You might also add a note to the RFE at
http://sourceforge.net/tracker/index.php?func=detailaid=843141group_id=103atid=350103


--
Mark Sapiro [EMAIL PROTECTED]   The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list
Mailman-Users@python.org 
http://mail.python.org/mailman/listinfo/mailman-users 
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py 
Searchable Archives:
http://www.mail-archive.com/mailman-users%40python.org/ 
Unsubscribe:
http://mail.python.org/mailman/options/mailman-users/asmith%40tyndale.ca


Security Policy:
http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp
--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp


Re: [Mailman-Users] patch to add date to each meassge in mail archiveIndex

2005-09-12 Thread Matt Ryanczak
Andrew,
Are you running mailman version 2.1.6? I you like, please send me a
copy of your HyperArch.py and I'll take a look at it. I did test this
patch out before sending it to the list so I know it works (well, at
least for me.

-Matt

On Mon, 2005-09-12 at 15:14 -0400, Andrew Smith wrote:
 I was looking for a solution to put the date available in the archives.
 I have completed the patch as described and get an error when I rebuild
 my archives
 - - - 
 File /opt/mailman/Mailman/Archiver/HyperArch.py, line 1005, in
 write_index_entry
 datestr = self.get_header(datestr, article)
   File /opt/mailman/Mailman/Archiver/HyperArch.py, line 1027, in
 get_header
 return getattr(article, field)
 AttributeError: Article instance has no attribute 'datestr'
 - - -
 
 Anyone able to help me with this?
 
 ---
 Andrew Smith
 Web Developer
 Tyndale University College  Seminary
 416-226-6620 (2714)
 --
 [EMAIL PROTECTED]
 http://www.tyndale.ca
 http://www.tyndale.ca/it
 http://www.tyndale.ca/~asmith
 --
 25 Ballyconnor Court
 Toronto, Ontario.
 M2M 4B3
 --
 Tyndale's Mission is to educate and equip Christians to serve the
 world with passion for Jesus Christ.
 ---
 
  Mark Sapiro [EMAIL PROTECTED] 9/12/2005 2:06:52 PM 
 Matt Ryanczak wrote:
 
 I was asked to make the date for each message in a mailman archive be
 visible in the index for that month. This required that I modify
 HyperArch.py and the template file archidxentry.html. I thought
 others
 might find this useful so here are the relevant patches for the
 mailman-2.1.6 source tree. 
 
 I apologize if this is a duplication of someone else efforts, I
 searched
 around and could not find a way to do this in mailman as it was or a
 patch to do the same.
 
 Thanks for developing this patch. It would help for tracking and
 possible adoption into the base if you would submit it to the Mailman
 patch tracker at
 http://sourceforge.net/tracker/?group_id=103atid=300103 
 
 You might also add a note to the RFE at
 http://sourceforge.net/tracker/index.php?func=detailaid=843141group_id=103atid=350103
 
 
 --
 Mark Sapiro [EMAIL PROTECTED]   The highway is for gamblers,
 San Francisco Bay Area, Californiabetter use your sense - B. Dylan
 
 --
 Mailman-Users mailing list
 Mailman-Users@python.org 
 http://mail.python.org/mailman/listinfo/mailman-users 
 Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py 
 Searchable Archives:
 http://www.mail-archive.com/mailman-users%40python.org/ 
 Unsubscribe:
 http://mail.python.org/mailman/options/mailman-users/asmith%40tyndale.ca
 
 
 Security Policy:
 http://www.python.org/cgi-bin/faqw-mm.py?req=showfile=faq01.027.htp
 --
 Mailman-Users mailing list
 Mailman-Users@python.org
 http://mail.python.org/mailman/listinfo/mailman-users
 Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
 Unsubscribe: 
 http://mail.python.org/mailman/options/mailman-users/ryanczak%40arin.net
 
 Security Policy: 
 http://www.python.org/cgi-bin/faqw-mm.py?req=showfile=faq01.027.htp
 

--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp


Re: [Mailman-Users] patch to add date to each meassge in mail archiveIndex

2005-09-12 Thread Matt Ryanczak
Mark,
Thanks or the information. I'll make sure to go through process of 
submitting this patch to the community site.

-Matt

Mark Sapiro wrote:

Matt Ryanczak wrote:

  

I was asked to make the date for each message in a mailman archive be
visible in the index for that month. This required that I modify
HyperArch.py and the template file archidxentry.html. I thought others
might find this useful so here are the relevant patches for the
mailman-2.1.6 source tree. 

I apologize if this is a duplication of someone else efforts, I searched
around and could not find a way to do this in mailman as it was or a
patch to do the same.



Thanks for developing this patch. It would help for tracking and
possible adoption into the base if you would submit it to the Mailman
patch tracker at
http://sourceforge.net/tracker/?group_id=103atid=300103

You might also add a note to the RFE at
http://sourceforge.net/tracker/index.php?func=detailaid=843141group_id=103atid=350103

--
Mark Sapiro [EMAIL PROTECTED]   The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

  



--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=showamp;file=faq01.027.htp