cschneid / irclogger

Sinatra based irclogger.com
http://www.irclogger.com
147 stars 15 forks source link

documentation #8

Open singingwolfboy opened 12 years ago

singingwolfboy commented 12 years ago

This looks like an awesome project, but I have no idea how to get started. Could you write some documentation, please? At the very least, a README.md containing:

And personally, I would love if you could also document how to get the code up and running for an internal use. I'm thinking about setting this up for my company, and we would of course need it to be not publicly accessible.

andypiper commented 11 years ago

I've played around with this over the past couple of days and while it looks exciting, it does require the Perl part in order to work. Specifically, you have to create a MySQL DB using the sql scripts in with the Perl bot, configure the bot (somehow), run it to log data into the database... and then the Sinatra front-end piece is usable. There's no real documentation here and I'd love to see it developed more fully in Ruby.

cschneid commented 11 years ago

Yeah, it's sorta janky.

Basically, the sinatra app here is only the front-end side of things. I use the bot side of this: https://github.com/moritz/ilbot to do the logging.

My bot conf is pretty simple:

# bot.conf
# Configuration for the bot
NICK = irclogger_com
SERVER = irc.freenode.net
CHANNEL = \#sinatra \#radiantcms \#datamapper \#sequel \#integrity \#dm-hacking \#rack \#cucumber \#rspec \#webrat \#capistrano \#poolpartyrb \#monk \#merb \#vagrant \#riak \#ohm \#padrino \#redis \#redis-rb \#akin \#buildr \#ruboto \#cappuccino \#coffeescript \#rubysur \#motion \#extjs \#mplayer \#veritas \#rvm \#brunch \#\#Paws \#travis \#batmanjs \#codebrawl \#rubypair \#Node.js \#amber-lang \#elliottcable \#mongodb \#\#Hat \#documentcloud  \#buster.js \#pyar \#adhearsion \#rubyperu \#tent \#akiban \#rethinkdb \#lift
#database.conf
DSN = mysql
DATABASE = irclogs
HOST = localhost
USER = xxx
PASSWORD = xxx

And then... umm.,... I just run nohup perl ilbot2.pl &..... it's really not very fancy.

The db has a single table: irclog, which looks like:

+-----------+-------------+------+-----+---------+----------------+
| Field     | Type        | Null | Key | Default | Extra          |
+-----------+-------------+------+-----+---------+----------------+
| id        | int(11)     | NO   | PRI | NULL    | auto_increment |
| channel   | varchar(30) | YES  | MUL | NULL    |                |
| day       | char(10)    | YES  |     | NULL    |                |
| nick      | varchar(40) | YES  |     | NULL    |                |
| timestamp | int(11)     | YES  |     | NULL    |                |
| line      | text        | YES  |     | NULL    |                |
| spam      | tinyint(1)  | YES  |     | 0       |                |
+-----------+-------------+------+-----+---------+----------------+
cschneid commented 11 years ago

I have certainly wanted to write the bot in ruby. And there's even a branch where I got started on it. Just never got finished enough, and moved onto other things.

I'll shift that up my todo list (maybe make a few issues to guide any contributions (wink wink)).

cschneid commented 11 years ago

And to be clear, the bot/ directory in this repo is a modified version of ilbot2 that I use. Only slightly modified, mostly just deleted a bunch of junk I didn't want.

andypiper commented 11 years ago

Cool... I hadn't checked the branches. Will take a poke.

andypiper commented 11 years ago

I was actually considering using the same DB, irclogger on the front-side, and modifying LogBot (Java PircBot from jibble.org) to log to the DB instead of to disk. that itself is no good to me as I a) can't write to the filesystem on Cloud Foundry and b) don't have PHP there for the front-end.