1 #!/usr/bin/perl -W
2 use HTML::FromANSI (); # avoid exports if using OO
3 use Term::ANSIColor;
4
5 open(FH,$ARGV[0]) or die ("Not able to open input file");
6
7 my $h = HTML::FromANSI->new(
8 fill_cols =>1,
9 cols =>120,
10 html_entity =>1,
11 font_face =>"monospace",
12 style =>"<line-height: 1; letter-spacing: 0; font-size: large;>",
13 tt =>1,
14 );
15
16 while(<FH>) {
17 chomp;
18 $h->add_text($_);
19 print $h->html;
20 $h->add_text("\n");
21 print $h->html;
22 $_="";
23 }
24
25 close(FH);