Produce html logs for our IRC logs

There is a tool, irclog2html, that knows how to take directories of irc
logs and turn them in to formatted html with per-line links. Since we do
that for build logs, and the logs associated with meetings, it seems
only sane that we do it for channel logs.

The tool groks mtime, so it will skip previously produced logs, and will
overwrite current streaming logs each time it's run. We'll need to run
the command one time by hand first, because the first run might take a
bit to eat through our history.

Change-Id: Ieed2c80d945ee35b29887d672cd9ebbd9ece2188
This commit is contained in:
Monty Taylor 2015-05-08 08:34:52 -04:00
parent 80571d4b7a
commit 1adb9b728f
2 changed files with 14 additions and 0 deletions

View File

@ -40,6 +40,11 @@ class meetbot {
ensure => present,
}
package { 'irclog2html':
ensure => 'present',
provider => pip,
}
file { '/var/lib/meetbot':
ensure => directory,
owner => 'meetbot',

View File

@ -93,6 +93,15 @@ define meetbot::site(
require => File["${varlib}/ircmeeting"],
}
cron { 'irclog2html':
user => 'meetbot',
weekday => '*',
hour => '*',
minute => '*/15',
command => "find ${varlib}/logs/ChannelLogger/${network} -mindepth 1 -maxdepth 1 -type d | xargs -n1 logs2html",
environment => 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin',
}
# we set this file as root ownership because meetbot overwrites it on shutdown
# this means when puppet changes it and restarts meetbot the file is reset
file { "/etc/init/${name}-meetbot.conf":