On Tue, Dec 11, 2007 at 09:44:08PM +1100, Hamish Moffatt wrote: > In case it's useful to anyone, here's a quick hack I put together for > easy BTS spam reporting from mutt. > > Firstly a keybinding for .muttrc: > > macro index B "<enter-command>unset > wait_key\n<pipe-entry>bugspam\n<enter-command>set wait_key\n<delete-message>" > macro pager B "<enter-command>unset > wait_key\n<pipe-entry>bugspam\n<enter-command>set wait_key\n<delete-message>" > > Secondly, a script called bugspam which goes somewhere in $PATH: > > #!/usr/bin/perl > > # Read message on stdin, get Bug#nnn from subject line then call > # "bts reportspam" to submit a spam report > > $bug = 0; > > while(<>) { > if (m/^Subject: (?:\[.*\])?\s*Bug#(\d+): /) { > $bug = $1; > last; > } > } > > if ($bug) { > print "Reporting spam in bug $bug\n"; > system "bts reportspam $bug"; > } else { > print "Bug number not found from subject line\n"; > } > > (And install devscripts to get the "bts" program.) > > Now, hit B on bug spam and be merry. > > Future enhancements might include reopening of occasional [EMAIL PROTECTED] > spam incidents. > > > I suppose the trend these days would be to blog this rather than post, > but I don't have one.
I use mutt but I don't have the library of scripts that I'm sure many DD's have to deal with debian-specific stuff, although I'd love one. Would anyone besides me be interested in pooling mutt scripts useful for DD's on the wiki or something? - David Nusinow -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]