Script to rebuild quotes
This isn't entirely mutt related, but I'm sure some of you will be interested. I 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 Becomes: > > > > > Bla bla, bla bla bla It 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 - [EMAIL PROTECTED] - http://www.aagh.net/
Re: Script to rebuild quotes
Hi, On Fri, 30 Nov 2001 Thomas <[EMAIL PROTECTED]> spewed into the ether: [-- snip --] > 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. Well, it seems like a great idea :-) If and when you finish the perl script, do post it (I just can't find the time/inclination to play with ruby right now ;-) pv. -- Prahlad Vaidyanathan <[EMAIL PROTECTED]>What, me worry ? http://www.symonds.net/~prahladv/Don't Panic ! -- msg20841/pgp1.pgp Description: PGP signature
Re: Script to rebuild quotes
Signing list email is a complete useless exercise and wastes my time if your key is not on any key servers (and yes, I tried several, just in case). [-- PGP output follows (current time: Fri 30 Nov 2001 12:14:19 PM GMT) --] gpg: Signature made Fri Nov 30 08:04:08 2001 GMT using DSA key ID 2125BB86 gpg: requesting key 2125BB86 from search.keyserver.net ... gpg: no valid OpenPGP data found. gpg: Total number processed: 0 gpg: Can't check signature: public key not found [-- End of PGP output --] -- Chicken Little only has to be right once.
Re: Script to rebuild quotes
Thomas -- ...and then Thomas Hurst said... % This isn't entirely mutt related, but I'm sure some of you will be % interested. % % I 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 Gee, who could the Evil One be? ;-) % % Becomes: % % > > > > > Bla bla, bla bla bla % % It 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. I'll wait for a perl copy, but I'm interested, too. % % Grab it at: http://freak.aagh.net/code/quotefix.rb % % -- % Thomas 'Freaky' Hurst - [EMAIL PROTECTED] - http://www.aagh.net/ :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.justpickone.org/davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg20865/pgp0.pgp Description: PGP signature
Re: Script to rebuild quotes
* David T-G <[EMAIL PROTECTED]> [30-11-2001 16:14]: | Thomas -- | | ...and then Thomas Hurst said... | % This isn't entirely mutt related, but I'm sure some of you will be | % interested. | % | % I 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 | | Gee, who could the Evil One be? ;-) I don't know, David ;) | % 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. | | I'll wait for a perl copy, but I'm interested, too. Same here. -- René Clerc - ([EMAIL PROTECTED]) Liar: One who tells an unpleasant truth. msg20868/pgp0.pgp Description: PGP signature
Re: Script to rebuild quotes
Hi, * David T-G <[EMAIL PROTECTED]> [01-11-30 16:11]: >% 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. >I'll wait for a perl copy, but I'm interested, too. No. Please don't. Thorsten -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. - Benjamin Franklin
Re: Script to rebuild quotes
On Fri, Nov 30, 2001 at 04:16:47PM +0100, René Clerc wrote: > > I don't know, David ;) > > | % 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. > | > | I'll wait for a perl copy, but I'm interested, too. I'll take mine in ruby please
Re: Script to rebuild quotes
* S. William Schulz ([EMAIL PROTECTED]) wrote: > On Fri, Nov 30, 2001 at 04:16:47PM +0100, René Clerc wrote: > > > > I don't know, David ;) > > > > > > 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. > > > > > > I'll wait for a perl copy, but I'm interested, too. > > I'll take mine in ruby please Initial perl version at: http://freak.aagh.net/code/quotefix.pl Now who wants a tcl version? ;) -- Thomas 'Freaky' Hurst - [EMAIL PROTECTED] - http://www.aagh.net/
Re: Script to rebuild quotes
Moin, * Thomas Hurst <[EMAIL PROTECTED]> [01-11-30 19:00]: >* S. William Schulz ([EMAIL PROTECTED]) wrote: >> On Fri, Nov 30, 2001 at 04:16:47PM +0100, René Clerc wrote: >> > > I'll wait for a perl copy, but I'm interested, too. >> I'll take mine in ruby please >Initial perl version at: > >http://freak.aagh.net/code/quotefix.pl > >Now who wants a tcl version? ;) What about INTERCAL? Thorsten -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. - Benjamin Franklin
Re: Script to rebuild quotes
Hi, On Fri, 30 Nov 2001 Thomas <[EMAIL PROTECTED]> spewed into the ether: [-- snip --] > Initial perl version at: > > http://freak.aagh.net/code/quotefix.pl Does this grok "^http:" and stuff ? Doesn't seem to do it here. So, what I did was, I converted the regexp it looks for into the $quote_regexp in my .muttrc, with a few changes. while ($line =~ /^(-->)|^([ \t]*[(A-Z){0,2}|(a-z){0,6}]+>)|^([ \t\"]*[|>}%])+/ Another thing is, the "Super-quotes", like "^ AA>", always seem to end in ">", and not in "[|}%]", etc. This could possible be changed by some sadistic people, but for now, I've omitted everything but ">". Also, this is something that comes up often in display filtering : When stripping of trailing white-spaces, don't strip off the white-space after the sig-dashes. Or, better yet, do this, before printing $line : $line =~ s/^--$/-- /; Anyway, great work ! But, unfortunately, the quest for the perfect quote_regexp seems never-ending :-( pv. -- Prahlad Vaidyanathan <[EMAIL PROTECTED]>What, me worry ? http://www.symonds.net/~prahladv/Don't Panic ! -- msg21140/pgp0.pgp Description: PGP signature
Re: Script to rebuild quotes
* Prahlad Vaidyanathan ([EMAIL PROTECTED]) wrote: > On Fri, 30 Nov 2001 Thomas <[EMAIL PROTECTED]> spewed into the ether: > [-- snip --] > > Initial perl version at: > > > > http://freak.aagh.net/code/quotefix.pl > > Does this grok "^http:" and stuff ? Doesn't seem to do it here. It should do, the ruby one certainly seems to, but the Perl version's poorly tested. You'll note the: && $1.$' !~ /^(>From|(http|mailto|ftp|telnet|gopher|scp|rsync):|[:;]-?\))/) The ^ is probably tripping it up - maybe a \s* is needed. > So, what I did was, I converted the regexp it looks for into the > $quote_regexp in my .muttrc, with a few changes. > > while ($line =~ /^(-->)|^([ \t]*[(A-Z){0,2}|(a-z){0,6}]+>)|^([ > \t\"]*[|>}%])+/ I'll see what I can rip out of that, but don't forget >FO > Another thing is, the "Super-quotes", like "^ AA>", always seem to end > in ">", and not in "[|}%]", etc. This could possible be changed by > some sadistic people, but for now, I've omitted everything but ">". Yeah, something worth exploiting, probably. > Also, this is something that comes up often in display filtering : > > When stripping of trailing white-spaces, don't strip off the > white-space after the sig-dashes. Or, better yet, do this, before > printing $line : > > $line =~ s/^--$/-- /; It's made with filtering individual blocks in mind, because this is how I format mail - I hit F2 to fix the quotes and F3 to run it through par, but I'll fix this. > Anyway, great work ! But, unfortunately, the quest for the perfect > quote_regexp seems never-ending :-( 47 downloads so far - 30 for the quick perl version and 17 for the original tested Ruby :) -- Thomas 'Freaky' Hurst - [EMAIL PROTECTED] - http://www.aagh.net/
Apologies for GPG hassle (WAS Re: Script to rebuild quotes)
Hi, On Fri, 30 Nov 2001 Lars <[EMAIL PROTECTED]> spewed into the ether: > > Signing list email is a complete useless exercise and wastes my time > if your key is not on any key servers (and yes, I tried several, just > in case). Am a bit new to the whole concept of encryption, so I apologize for the trouble I've caused. I've now put my key onto www.keyserver.net. I think I've done it right, because when I searched for myself, I found me. Have also got hold of some literature, so I will RTFM over the next couple of days. Meanwhile, I'll also try to pry out my foot from my immensely accomodating mouth :-) Oh, and Steve Kennedy, I believe that's my key that gpg can't check. Try now, it should be alright. Sorry again. NOT signing off, pv. PS: If anyone knows of any good reading material, do point it me off-list. -- Prahlad Vaidyanathan <[EMAIL PROTECTED]>What, me worry ? http://www.symonds.net/~prahladv/Don't Panic ! --