namazu-users-en
[Top] [All Lists]

Re: Mailman and summary

2003-06-23 11:42:27
On Sat, Jun 21, 2003 at 03:42:09PM +0530, Philip S Tellis wrote:
On Fri, 20 Jun 2003, Earl Hood wrote:

<http://mm.tkikuchi.net/pipermail.pl>

Looking at the filter, it appears you will not get any field based
indexing.  I.e. Namazu has special support for mail messages by

I've patched the filter to do field based indexing.  Not sure if it 
works in all cases.  Try it out:

--- namazu-2.0.10/filter/pipermail.pl Sat Jun 21 14:35:43 2003
+++ pipermail.pl      Sat Jun 21 15:19:28 2003
@@ -88,7 +88,9 @@
 sub pipermail_filter ($$) {
     my ($contref, $weighted_str) = @_;
 
+    $$contref =~ s{<h1>(.*?)</h1>\s*<b>(.*?)</b><a 
href=.*?>(.*?)</a><br>\s*<i>(.*?)</i>}
+                     {Subject: $1\nFrom: $2 <$3>\nDate: $4\n</H1>}si;
     $$contref =~ s/<!--endarticle-->.*//s;
-    $$contref =~ s/(<\/H1>).*<!--beginarticle-->/$1/s;
+    $$contref =~ s/(<\/H1>).*<!--beginarticle-->/$1/si;
 }
 1;

I'm not having much luck with the patch. I copied it and saved it as pp, then
did

patch pipermail.pl <pp

and got

missing header for unified diff at line 3 of patch
patching file pipermail.pl
Hunk #1 FAILED at 88.
1 out of 1 hunk FAILED -- saving rejects to file pipermail.pl.rej

Todd

<Prev in Thread] Current Thread [Next in Thread>