Note: You are viewing an old revision of this page. View the current version.
Mutt helper scripts
I've developed/modified/copied a number of small helper scripts for mutt over the years. These scripts help with things like converting weird mime attachments and converting html mail to text.
I've tried to structure all my filter scripts to use either w3m or lynx for html-to-text conversion. I recommend w3m as it does a better job, but you have to compile and install it yourself. Here's my scripts along with a few from other people, as noted:
- view-html - convert html to text. Requires w3m or lynx.
- view-excel - convert excel spreadsheets to html and then to text. Requires xlHtml and w3m or lynx.
- view-msword - convert word docs to html and then to text. Requires wvWare and w3m or lynx
- octet-filter - the default MIME type for data is application/octet-stream. This script takes attachments of this type and uses file(1) on them to try and determine what viewer to use. Modified from original at http://www.davep.org/mutt/.
- vcard-filter - vcards are electronic business cards. Netscape mailers in particular often attach these to messages. This perl script decodes vcards and prints them as text. From http://www.davep.org/mutt/.
- tnef2txt - Microsoft mailers occasionally use the transport neutral encoding format, some sort of encapsulation mechanism. This filter will show the details of tnef-encoded attachments. Note that this is a Linux/x86 executable, you will need the source code to compile on other architectures. From Brandon's Program Archive.
- lyx2txt - a script to convert lyx documents into text. This is a little difficult as lyx won't operate on streams.
- rtfreader - converts rich text format docs into text. Microsoft docs are occasionally exported in to this format. Note this is a Linux/x86 binary, you can compile from source for other platforms. From Brandon's Program Archive.
- ispeller.pl - a script to call ispell on just the body of a message, not the whole thing. Use "set ispell=ispeller.pl" in your .muttrc to use.
Additional programs you will need:
- w3m - an alternative text web browser. Much better table support than lynx. This is a Linux/x86 binary, others should build from ftp://ftp.hollenback.net/pub/src/w3m-0.1.10.tar.gz.
- wvWare - converts microsoft word documents to various formats. Here's the source.
- lynx - the standard text web browser, so I don't include it here. Use if you don't have w3m, works ok.
- xlHtml - converts excel spreadsheets into html. You will also need xlHtml-cole. Or, you can built from source.
Take a look at my sampleDotMailcap for examples on how to use these scripts.