Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A chatty IRC bot

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 utils
Octocat-spinner-32 .bashrc
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .inputrc
Octocat-spinner-32 .screenrc
Octocat-spinner-32 README.mkdn
Octocat-spinner-32 setup.sh
README.mkdn

failo

Train

pv ~avar/.irssi/logs/freenode/#avar.log\  | irchailo-seed -f irssi -b failo -n failo -r '^,\w' > avar.trn

Import

With SQLite:

time hailo --brain failo.sqlite --train avar.trn

With PostgreSQL:

dropdb failo
createdb -E UTF8 -O failo failo

# Train via sqlite
sqlite3 failo.sqlite .dump | pv > /tmp/failo.sql
pv /tmp/failo.sql | grep -e ^BEGIN -e ^INSERT -e ^COMMIT | perl -pe "s[,\K'][E']" | perl -pe 's[\\][\\\\]g' > /tmp/failo.pgsql
pv /tmp/failo.sql | grep -e ^BEGIN -e ^INSERT -e ^COMMIT | grep -v '^INSERT INTO "sqlite_sequence"' | perl -pe "s[,\K'][E']" | perl -pe 's[\\][\\\\]g' > /tmp/failo.pgsql

# Just create an empty db, hailo won't learn from this:
hailo --brain hinrk-fails --learn "token" --storage DBD::Pg --storage-args dbname=failo
echo 'delete from token;' | psql

# Import it
pv /tmp/failo.pgsql | psql failo 2>&1 | tee /tmp/pgsql.err

time hailo --brain hinrk-fails --train avar.trn --storage DBD::Pg --storage-args dbname=failo
Something went wrong with that request. Please try again.