Skip to content
/ Stats Public

Stats/Analytics generator for IRC, Slack and Twitch channels

License

Notifications You must be signed in to change notification settings

0x263b/Stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stats

Stats/Analytics generator for IRC, Slack and Twitch channels

Demos

Slack provides a stats page of their own at https://<group>.slack.com/stats (Example output from NYCTech)

Usage

This script assumes your logs are formatted like so

[2006-01-02 15:04:05 -0700] <joebloggs> This is a message
[2006-01-02 15:04:05 -0700] * joebloggs is preforming an action

Take a look at this gist for how to obtain logs from Slack.

Note: This script works best if you split your logs into multiple files. ex: #channel/YYYY-MM.log

Basic usage

Edit config.yaml and set :locationto your log file, then run stats.rb. This will create a database.json and stats.html in the script directoy.

Example config

# Full path to your log file or directory (mandatory)
:location: "/home/Alice/irc/logs/#channel.log"

# Full path to generated .html file
:save_location: /var/www/example.com/stats.html

# Full path to database file
:database_location: /var/www/example.com/database.json

# Page info in the header of generated .html
:title: Some Channel
:description: Some Channel is some channel on some network

# The interval (distance between numbers) for the scale on the days heatmap. Integer
:heatmap_interval: 50

# Ignore list
:ignore:
  - somebot
  - otherbot

# Combine nick names for people who use multiple
:correct:
  joebloggs:
    - joebloggs_away
    - joebloggs_phone
  fred: 
    - fred_
    - freddy

# Url and Avatar to show in active users table
:profiles:
  joebloggs:
    :url: https://www.example.com
    :avatar: https://secure.gravatar.com/avatar/ba1e13e0887456893b07e4ee8e78aece
  fred:
    :url: http://www.something.com
    :avatar: http://www.something.com/stuff/fred.jpg
 
# Twitch varirant specific

# Custom twitch emotes
:emotes:
  - AWOO
  - reckClap

# Youtube API Key for !songrequest info
:youtube_api: XXXXXXXXXXXXXXXXXXXX

About

Stats/Analytics generator for IRC, Slack and Twitch channels

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages