<commit_before>Install
=======

Installing ZenIRCBot will one day be much simpler, but for now there
are a number of steps to it.

To start with, the bot is written in JavaScript_ using the Node_
platform. Two of the services are written in or rely on Python_ the
rest are written in JavaScript.

Getting the bot running
-----------------------

To start with you'll need to install Node_, npm_ and Redis_. Once you
have those you'll need to use npm to install the node library for
redis.:

    npm install redis

If you want to use the admin service for starting/stopping/restarting
the bot and the services you'll also need to install Python_,
virtualenv_, and tmux_. Create a virtualenv and install Fabric_ in
it (if you have virtualenvwrapper installed already feel free to use
it of course)::

    virtualenv zib
    source zib/bin/activate
    pip install fabric

Once you've done that it is on to configuring the bot. All of the
configs have examples provided in the form of .dist files. The first
one that will concern us is config.js in the root.:

    cp config.js.dist config.js

Edit config.js and customize it to what you need.

Once you've done that, if you setup Python/virtualenv/tmux you can
run::

    fab zenircbot start

Otherwise you'll just run::

    node bot.js<commit_msg>I should read the .rst docs before writing docs again<commit_after>Install
=======

Installing ZenIRCBot will one day be much simpler, but for now there
are a number of steps to it.

To start with, the bot is written in JavaScript_ using the Node_
platform. Two of the services are written in or rely on Python_ the
rest are written in JavaScript.

Getting the bot running
-----------------------

To start with you'll need to install Node_, npm_ and Redis_. Once you
have those you'll need to use npm to install the node library for
redis::

    npm install redis

If you want to use the admin service for starting/stopping/restarting
the bot and the services you'll also need to install Python_,
virtualenv_, and tmux_. Create a virtualenv and install Fabric_ in
it (if you have virtualenvwrapper installed already feel free to use
it of course)::

    virtualenv zib
    source zib/bin/activate
    pip install fabric

Once you've done that it is on to configuring the bot. All of the
configs have examples provided in the form of .dist files. The first
one that will concern us is config.js in the root::

    cp config.js.dist config.js

Edit config.js and customize it to what you need.

Once you've done that, if you setup Python/virtualenv/tmux you can
run::

    fab zenircbot start

Otherwise you'll just run::

    node bot.js
{'fraction_non_alphanumeric': 0.059605163249810175, 'fraction_numerical': 0.0, 'mean_word_length': 3.4285714285714284, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6839045', 'n_tokens_mistral': 738, 'n_tokens_neox': 696, 'n_words': 416}