http://www.andre-simon.de/doku/ansifilter/ansifilter.html
たとえば
~/work/$ ll /usr/local/ruby-1.8 | ansifilter --html > hoge.html
とかやると
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>Source file</title> </head> <body> <pre style="font-family:Courier New;font-size:10pt;">total 20 drwxr-xr-x 9 g-sugawara 0 Nov 2 11:32 <span style="font-weight:bold;color:#000080; background-color:#ffffff;">.</span>/ drwxr-xr-x 34 g-sugawara 0 Jan 17 10:49 <span style="font-weight:bold;color:#000080; background-color:#ffffff;">..</span>/ -rw-r--r-- 1 g-sugawara 2493 Feb 25 2002 COPYING -rw-r--r-- 1 g-sugawara 2093 Jul 19 2001 COPYING.ja -rw-r--r-- 1 g-sugawara 4348 Jun 16 2007 README.ja.txt -rw-r--r-- 1 g-sugawara 3173 Jun 16 2007 README.txt drwxr-xr-x 2 g-sugawara 0 Jan 15 10:50 <span style="font-weight:bold;color:#000080; background-color:#ffffff;">bin</span>/ drwxr-xr-x 2 g-sugawara 0 Oct 19 21:37 <span style="font-weight:bold;color:#000080; background-color:#ffffff;">doc</span>/ drwxr-xr-x 3 g-sugawara 0 Sep 20 13:17 <span style="font-weight:bold;color:#000080; background-color:#ffffff;">exerb-docs</span>/ drwxr-xr-x 3 g-sugawara 0 Nov 2 11:32 <span style="font-weight:bold;color:#000080; background-color:#ffffff;">lib</span>/ drwxr-xr-x 2 g-sugawara 0 Sep 20 13:18 <span style="font-weight:bold;color:#000080; background-color:#ffffff;">licences</span>/ drwxr-xr-x 5 g-sugawara 0 Oct 19 21:37 <span style="font-weight:bold;color:#000080; background-color:#ffffff;">samples</span>/ drwxr-xr-x 7 g-sugawara 0 Sep 20 13:43 <span style="font-weight:bold;color:#000080; background-color:#ffffff;">share</span>/ </pre> </body> </html> <!--HTML generated by ansifilter 0.3, http://www.andre-simon.de/-->
な感じのHTMLが出力されて、こんな感じになる。