Our Jabber chat bot. It's modelled after GitHub's Hubot but written in Python instead of CoffeeScript.
- unix-compatible operating system
- make
- Python 2.x >= 2.7
- virtualenv
-
Clone the repository:
git clone git://github.com/smarkets/hal.git
-
Build the virtualenv (in projects directory):
make virtualenv
-
Run HAL
./env/bin/python main.py [--name HAL] [--adapter shell]
As you can see, there are 2 command line parameters (both optional):
name
- the name under which bot appears in chatroomsadapter
- chat adapter to use
There's also a builtin HTTP server which can be used by plugins to offer some functions, it's configuration consists of the following variables:
-
HAL_HTTP_HOST
- what address to bind listening socket to (0.0.0.0
listens on all interfaces,127.0.0.1
allows access only from local machine), default:127.0.0.1
-
HAL_HTTP_PORT
- port to listen on, default:8888
-
HAL_PLUGIN_DIRECTORIES
- Directories to load other plugins from -
HAL_ADAPTER_DIRECTORIES
- Directories to load extra adapters from
Adapter takes care of bot's communication with event source and destination (in general - some chat room).
Allows use of HAL using operating system terminal. You simply run HAL and are presented with application's command prompt. To use some adapter you may need to specify additional environment variables.
Provides bot support for Jabber/XMPP chat rooms.
Required environment variables:
HAL_JABBER_JID
- jabber idHAL_JABBER_PASSWORD
- passwordHAL_JABBER_ROOMS
- comma separated list of rooms (currently no password-protected rooms supported)
Optional environment variables:
HAL_JABBER_CONFERENCE_SERVER
- Specify if conference server is different thanconference.JABBERIDSERVER