From 6a503d70f9f8d978b9ae3d7243c03a31bdd83cfa Mon Sep 17 00:00:00 2001 From: Paul Mangan Date: Mon, 26 Nov 2001 11:04:57 +0000 Subject: [PATCH] read top level mailbox name - presume nothing --- tools/README | 8 ++++++-- tools/filter_conv.pl | 21 ++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/tools/README b/tools/README index 47a6af7dc..449f56eca 100644 --- a/tools/README +++ b/tools/README @@ -27,11 +27,15 @@ This perl script provides easy conversion of your filtering rules form sylpheed's old filter system to the new filtering system used - in sylpheed-claws. It reads 'filterrc' and outputs 'filteringrc'. + in sylpheed-claws. It reads '~/.sylpheed/filterrc' and outputs + '~/.sylpheed/filteringrc'. + + Your old filter settings are preserved, if you want to go back to + the original filter system simply delete ~/.sylpheed/filteringrc HOW TO USE IT - Issue the following command: + Issue the following command from the 'tools' directory: perl filter_conv.pl diff --git a/tools/filter_conv.pl b/tools/filter_conv.pl index e932a5c25..68ccf74b2 100644 --- a/tools/filter_conv.pl +++ b/tools/filter_conv.pl @@ -18,27 +18,22 @@ # * chdir; -chdir '.sylpheed' || die("You don't appear to have Sylpheed installed"); +chdir '.sylpheed' || die("You don't appear to have Sylpheed installed\n"); -open(FOLDERLIST, "; close FOLDERLIST; foreach $folderlist (@folderlist) { if ($folderlist =~ m/\n//ig; + $folderlist =~ s/^ +//; + $mailbox = $folderlist; } } -if (!$TOPBOXIS) { - $TOPBOXIS = "Mail"; -} - -open (FILTERRC, "; close FILTERRC; @@ -62,7 +57,7 @@ $WRITE_THIS .= "from match \"$split_lines[1]\""; if (!$split_lines[5]) { $WRITE_THIS .= " delete"; } elsif ($split_lines[8] == "m"){ -$WRITE_THIS .= " move \"\#mh/$TOPBOXIS/$split_lines[5]\""; +$WRITE_THIS .= " move \"\#mh/$mailbox/$split_lines[5]\""; } $WRITE_THIS .= "\n"; -- 2.25.1