Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Converting IRC logs to HTML as simply as possible
branch: master

This branch is 1 commit ahead, 42 commits behind ap:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


This script converts IRC logs in UTF-8 to HTML pages, while attempting to stay as close to no parsing as feasible.

It requires Object::Tiny, Digest::SHA1 and Perl 5.10 (or newer).


irclog2html \#foo.1.log \#foo.2.log > channel-foo.log.html

CGI mode

The script detects whether it was run under a name ending in .cgi and switches to acting as a CGI. There may be a better solution for this.

In CGI mode it looks at the environment variable IRCLOG (or REDIRECT_IRCLOG) for the filename to read.

So put it somewhere where your web server can find it, with a filename ending in .cgi, eg.:

ln -s `which irclog2html` /var/www/cgi-bin/irclog2html.cgi

Then add something like the following lines to .htaccess or to your Apache configuration:

AddType text/plain .irclog
AddCharset utf-8 .irclog

RewriteEngine On
RewriteCond %{QUERY_STRING} !(^|[&;])src=1($|[&;])
RewriteCond %{REQUEST_FILENAME} (.*\.irclog)$
RewriteRule .* /cgi-bin/irclog2html.cgi [E=IRCLOG:%1]
Something went wrong with that request. Please try again.