#!/usr/bin/env perl
use strict;
use warnings;
use App::htmlcat;



=head1 NAME

htmlcat - stdin to your browser


   $ command-that-prints-to-stdout | htmlcat --exec=open


C<htmlcat> renders stdin in HTML, by establishing a temporary HTTP server.

Requires modern browser that recognize Server-Sent Events <http://dev.w3.org/html5/eventsource/>.


=over 4

=item Highlights ANSI code in HTML

=item Real-time stdin stream to browsers

=item Support for multiple clients


=head1 OPTION

=over 4

=item --exec=I<command>

Invokes I<command> with the URL C<htmlcat> listens as the only argument.
Typically a command which opens a browser would be useful.

=item --host=I<host>, --port=I<port>

Specifies the host or port to listen. Actually they are
handled by L<Plack::Runner>, so C<htmlcat> does nothing with them.


=head1 AUTHOR

motemen E<lt>motemen@gmail.comE<gt>

=head1 THANKS TO

mala, for Server-sent events implementation

=head1 LICENSE

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.