I find myself regularly using terminals and thus have grown to love any tool that allows me to remain in terminal. Mutt is only of those, a fantastic terminal mail client. The only issue is that most people these days send HTML e-mails rather than plain text. This means that when I open them in mutt it is very unreadable. However there is a very simple solution.
First off lets make a simple script to convert the HTML into text. Several terminal based browsers exist and these can do the conversion for us (make sure to place it in your PATH somewhere).
#!/bin/sh
if [ ! -z `which links | grep -v 'no links'` ]
then
links -html-numbered-links 1 -html-images 1 -dump "file://$@"
elif [ ! -z `which lynx | grep -v 'no lynx'` ]
then
lynx -force_html -dump "$@"
elif [ ! -z `which w3m | grep -v 'no w3m'` ]
then
w3m -T text/html -F -dump "$@"
else
cat $@
fi
Add this to your ~/.muttrc:
auto_view text/html
alternative_order text/enriched text/plain text text/html
And then this to your ~/.mailcap:
text/html;html2txt %s; copiousoutput
Start up Mutt and get nothing but text e-mails.
I recently reinstalled my CentOS (to upgrade to 5.3) and this time I decided to use a netinstall method. The netinstall can be very useful if you have a local repository of RPM files and even then it can be nice to download a very small ISO (only 8.3Mb).
So here is how you can do it for yourself. If you require to setup any partitioning scheme before hand, I highly recommend Partition Logic as a good run-from-CD partitioning tool. You will also need to download the small CentOS NetInstall ISO.
- Boot from the ISO
- Type linux askmethod at the boot prompt
- Select the required network setup. Normally DHCP is good enough, disable IPv6 unless you plan on using it.
- Select HTTP as the installation method.
- If you have a local web server with your RPM’s on it then put in the information there. Otherwise use: mirror.centos.org and centos/5.3/os/i386.
- Finally start the installation process.
The whole thing should take no more than a couple of hours to complete. This method allows you to quickly start an installation of CentOS without the need to download all 6 of the CD’s or the DVD image.
I recently came across this caused me to smile if not giggle.
ENOTOBACCO Read on an empty pipe
EBEFOREI Invalid syntax
ECHERNOBYL Core dumped
ECRAY Program exited before being run
EDINGDONG The daemon is dead
EFLAT System needs tuning
EGEEK Program written by inept Frat member
EIEIO Here-a-bug, there-a-bug, ....
EIUD Missing period
ELECTROLUX Your code could stand to be cleaned up
EMILYPOST Wrong fork
END.ARMS.CONTROL Silo overflow
ENOHORSE Mount failed
ENONSEQUETOR C program not derived from main(){printf("Hello, world");}
EWATERGATE Extended tape gap
EWOK Aliens sighted
EWOK Your code appears to have been stir-fried
EWOULDBNICE The feature you want has not been implemented yet
Not to be out done, a new signal:
SIGNUKE Nuclear event occurred (cannot be caught or ignored)
Comments