Skip to content

Instantly share code, notes, and snippets.

@l0gicpath
Forked from anonymous/loghn.pl
Created May 25, 2016 09:16
Show Gist options
  • Save l0gicpath/7c2eab0ef6edd10bf75f1786e0e3a4c6 to your computer and use it in GitHub Desktop.
Save l0gicpath/7c2eab0ef6edd10bf75f1786e0e3a4c6 to your computer and use it in GitHub Desktop.
use HTML::FromANSI ();
open (LOG, '>>hnchatlog.html');
select((select(LOG), $|=1)[0]);
print LOG "<body bgcolor=black>\n";
while (<>) {
my $h = HTML::FromANSI->new();
print LOG $h->ansi_to_html($_), "\n";
}
ssh watchdog@chat.shazow.net | tee >(perl loghn.pl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment