Jeff Abrahamson on Tue, 18 Mar 2003 23:21:19 -0500


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] mutt text/* auto-view hack


I recently added an auto-view directive for mime type text/*. Then I
needed to specify a viewer, so I specified cat. (Special cases come
first, so text/html is still handled by lynx, for example.) Never mind
why, it solved an obscure problem.

But then I realized I could do more things. So now even text/plain
gets statistics computed. My auto-viewer is mutt-cat-view (6 lines, 21
words, 141 characters). It's attached, for your amusement. I think
it's cool to know just how many words you wrote me when I read your
email. I'm trying to think of more interesting analyses to do.

-- 
 Jeff

 Jeff Abrahamson  <http://www.purple.com/jeff/>
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B
#!/bin/sh

x=/tmp/mutt-view$$.txt
tee $x | wc | awk '{printf("  [%d lines, %d words, %d characters]\n",$1,$2,$3);}'
echo
cat $x
/bin/rm -f $x

Attachment: pgpYBnh3QCZ9w.pgp
Description: PGP signature