# NAME
HTML::FromANSI::Tiny - Easily convert colored command line output to HTML
# VERSION
version 0.100
# SYNOPSIS
use HTML::FromANSI::Tiny;
my $h = HTML::FromANSI::Tiny->new(
auto_reverse => 1, background => 'white', foreground => 'black',
);
# output from some command
my $output = "\e[31mfoo\033[1;32mbar\033[0m";
# include the default styles if you don't want to define your own:
print $h->style_tag(); # or just $h->css() to insert into your own stylesheet
print $h->html($output);
# prints 'foobar'
# DESCRIPTION
Convert the output from a terminal command that is decorated
with ANSI escape sequences into customizable HTML
(with a small amount of code).
This module complements [Parse::ANSIColor::Tiny](http://search.cpan.org/perldoc?Parse::ANSIColor::Tiny)
by providing a simple HTML markup around its output.
[Parse::ANSIColor::Tiny](http://search.cpan.org/perldoc?Parse::ANSIColor::Tiny) returns a data structure that's easy
to reformat into any desired output.
Reformatting to HTML seemed simple and common enough
to warrant this module as well.
# METHODS
## new
Constructor.
Takes a hash or hash ref of options:
- `ansi_parser` - Instance of [Parse::ANSIColor::Tiny](http://search.cpan.org/perldoc?Parse::ANSIColor::Tiny); One will be created automatically, but you can provide one if you want to configure it.
- `class_prefix` - String to prefix class names; Blank by default for brevity. See ["html"](#html).
- `html_encode` - Code ref that should encode HTML entities; See ["html_encode"](#html_encode).
- `no_plain_tags` - Boolean for omitting the `tag` when the text has no style attributes; Defaults to false for consistency.
- `selector_prefix` - String to prefix each css selector; Blank by default. See ["css"](#css).
- `tag` - Alternate tag in which to wrap the HTML; Defaults to `span`.
For convenience and consistency options to ["new" in Parse::ANSIColor::Tiny](http://search.cpan.org/perldoc?Parse::ANSIColor::Tiny#new)
can be specified directly including
`auto_reverse`, `background`, and `foreground`.
## ansi_parser
Returns the [Parse::ANSIColor::Tiny](http://search.cpan.org/perldoc?Parse::ANSIColor::Tiny) instance in use.
Creates one if necessary.
## css
my $css = $hfat->css();
Returns basic CSS code for inclusion into a `