Script to reformat message quotes
- Someone (a quick mboxgrep shows it's Rory Campbell-Lange
<rory@...>) was asking for a way to fix poorly quoted
mail, since par only seems cabable of reflowing, not rebuilding the
I don't think anyone mentioned anything suitable, so I've just finished
(for tonight :) tweaking a script designed to rebuild quote strings with
the One True Quote String ('> ', obviously), even if you're replying to
someone with a really evil one. For instance:
name> : |% >TH Bla bla, bla bla bla
> > > > > Bla bla, bla bla blaIt handles most special cases (including smileys, URI's and >From),
and can be configured to compress quotes ('>>>>> '), strip trailing
whitespace and not generate quotes for blank lines.
It's written in Ruby (http://www.ruby-lang.org/), but I can do a Perl
version if anyone really doesn't want to install Ruby.
Grab it at: http://freak.aagh.net/code/quotefix.rb
Thomas 'Freaky' Hurst - freaky@... - http://www.aagh.net/