Skip to content

Converting IRC logs to HTML as simply as possible

Notifications You must be signed in to change notification settings

ap-miscellanea/irclog2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 

Repository files navigation

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

The generated web page contains an anchor for each line so that you can jump to and link to specific lines, and cut-off links to select a particular portion of the log. Links in conversation will also be clickable.

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

Usage

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

CGI mode

If the script detects that it was run in a CGI environment, it will look at the PATH_TRANSLATED environment variable for the filename to read. The assumption is that the script will be run by the web server to handle requests against particular files.

Put it somewhere for your web server to find, 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:

AddCharset utf-8         .irclog
AddType    text/x-irclog .irclog
Action     text/x-irclog /cgi-bin/irclog2html.cgi

After that, any file with the extension .irclog in your web server’s document root will automatically be rendered as an IRC log.

About

Converting IRC logs to HTML as simply as possible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages