Installation - Hibby/jsis GitHub Wiki
All instructions assume you're running linux & irssi, as that's all I've played with JSIS on.
Dependencies
- Node.js and NPM (node package manager).
- Webserver of some sort (I use apache)
- Irssi or eggdrop (or a client capable of outputting logs in those formats)
- Free time
JSIS Install
To install JSIS:
- Clone the repo
git clone https://github.com/Hibby/jsis.git
into the directory of your choice or download and unzip master.zip into the directory of choice - Install ejs and iconv modules in that directory:
modules="ejs iconv"; for module in $modules; do npm install $module; done
cp config.example.js config.js
and edit to bring in line with your channel.- run
node jsis.js
and it outputs HTML to the folder of your choice
User Config
Obviously, it's a bad idea to run JSIS as root from crontab because reasons. To get around this, you can add the stats user on your system to the web-server group, so stats user can edit the contents of only the stats folders. In my case, it would be:
usermod -a -G www-data stats
The -a is really important as it appends www-data to the other groups this user is part of instead of replacing them all.
Ensure the folder that the stats are to be written to is owned by the web server and it's group:
chown -R www-data:www-data /var/www/stats
And ensure the folder can be written to by group:
chmod -R g+rw /var/www/stats
IRSSI Config
I like to keep my stats files organised by day and automatically rotated. To ensure irssi does this, start logging:
/log open -targets #statschannel ~/irclogs/network/statschannel/#statschannel-%y-%m-%d.log
Where statschannel is the name of my channel I want to log stats for. Telling JSIS where to pick this up is in config.js, specifically:
logPath: '/home/stats/irclogs/network/statschannel', logFileFilter: /#statschannel-\d\d-\d\d-\d\d\.log/, recursive: true,
By keeping recursive true, it checks each log until it hits the maxLogFiles
value