This article is from the the official alt.spleen FAQ, by Andrew Stellman with numerous contributions by others.
Andrew says: NOTE: PLEASE DO NOT SEND ANY MAIL TO ME REQUESTING MEDICAL ADVICE! I AM NOT A DOCTOR, AND WILL NOT GIVE YOU ANY USEFUL INFORMATION.
Yes, I did. That probably makes me a hopeless nerd. On the other hand, it saves me some time. I wrote the script in perl5, and it can be found at <http://anon.razorwire.com/alt.spleen.FAQ/htmlify.pl>.
Please note: due to a horrifying accident, I lost the old version of htmlify, which made me really unhappy. I recently rewrote it, and it's probably the most readable perl script I've ever written. It's even (somewhat) documented! You definitely don't see that every day, kids.
Special thanks to Benjamin Elijah, without whom my regexps would be slightly irregular.