W3C home > Mailing lists > Public > www-rdf-rules@w3.org > September 2001

fixing archive threads

From: Eric Prud'hommeaux <eric@w3.org>
Date: Thu, 13 Sep 2001 12:48:27 -0400
To: www-rdf-rules@w3.org
Message-ID: <20010913124827.A27938@w3.org>
There were some messages in the archive with an unusual form of
In-Reply-To header. Neither smartlist nor mutt could thread them
properly and I get fed up trying to follow the thread so I fixed them
for my mbox and for the W3C archive[1]. I fixed my mbox archive with
an emacs replace-regexp replacing:
^In-Reply-To: Message from "\([^"]+\)" <\([^>]+\)>
 + of "\([^"]+\)" <\([^>]+\)>$
with:
In-Reply-To: <\4>; from \2 on \3

The list archive [1] was in maildir format (one file per messsage) so
I didn't want to edit each one. Instead I used perl's in-place editing
factilities:
perl -ni -e "if (\$state == 1) {     if (m/^ +of \\\"([^\\\"]+)\\\" <([^>]+)> *\$/) {   print \"In-Reply-To: <\$2>; from \$from on \$1\";     } else {   print STDERR \"mismatch: \$.\\n\";     }     \$state = 0; } else {     if (m/^In-Reply-To: Message from ([^\<]+)<([^>]+)> */) {   \$from = \$3;   \$state = 1;     } else {   print;     } }" *

Hopefully others may benifit from my obsessiveness.

[1] http://lists.w3.org/Archives/Public/www-rdf-rules/
-- 
-eric

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.
Received on Thursday, 13 September 2001 12:48:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:53:09 GMT