Changes between Version 2 and Version 3 of WikiStart


Ignore:
Timestamp:
01/11/09 19:32:42 (12 years ago)
Author:
pjf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v2 v3  
    1717   * ...contacts logs out, close all file descriptors, wait 3 seconds and send a SIGKILL
    1818
    19 Why ''the chain''? Because the idea is to split bot implementation into many small modules connected using standard UNIX pipes (hence the chain).
     19Why ''the chain''? Because the idea is to split bot implementation into many small modules connected using standard UNIX pipes (but you don't have to).
    2020
    21 You pass a path to your bot directory as first argument to jabbot. The directory needs to contain executable files whose names match a pattern of "XY-*", where X and Y are digits (this is to ensure proper ordering), and the star means anything you want.
     21You pass a path to your bot directory as first argument to jabbot. The directory needs to contain:
     22 * an executable file named "bot", being your Jabber bot implementation, and
     23 * a directory named "fc" holding bot configuration in the [http://projects.asn.pl/flatconf/ Flatconf 2] format (according to schema "jabbot", delivered with sources).
    2224
    23 For example, if you have "10-help-handler.sh" and "20-logger.py" in your bot directory, jabbot will start "sh -c -- ./10-help-handler.sh | ./20-logger.py".
     25== Configuration ==
     26Exemplary configuration:
     27
     28{{{
     29pjf@pjf:~/projects/jabbot$ fcc bots/joblog/fc/
     30Welcome to Flatconf CLI. Type ? for help.
     31pjf /> ls
     32  Jabber connection
     33    [text] server           Jabber server to connect to
     34           `asn.pl`
     35    [int ] port             Server port
     36           `5222`
     37    [text] login            Username to use for login
     38           `joblog`
     39    [text] password         Account password
     40           `blahblah`
     41    [text] resource         Connection resource name
     42           `joblog 2.0`
     43    [int ] prio             Resource priority
     44           `0`
     45    [bool] ssl              Use SSL
     46           `1`
     47    [text] fingerprint      Expected SSL MD5 fingerprint
     48           `97:17:CF:6E:02:B5:09:4A:18:D7:B3:4B:9E:96:53:2F`
     49    [bool] starttls         Use STARTTLS for SSL
     50           `0`
     51  Jabbot settings
     52    [text] name             Name to show in syslog
     53           `joblogd`
     54    [bool] oneline          Convert multiline messages to many one-liners; crop multiline status texts
     55           `1`
     56}}}
    2457
    2558== Chain input ==
    26   Please note that the construction of the chain requires that '''you need to pass everything you receive on stdin to stdout''', unless you want to do some sort of filtering (surprise, surprise - neat feature!). Dont worry about the last element in chain - the I/O protocol handles that.
     59  Please note that if you want to implement your bot as a chain (modules connected with UNIX pipes), '''you need to pass everything you receive on stdin to stdout''' in each module, unless you want to do some sort of filtering (surprise, surprise - neat feature!). Dont worry about the last element in chain - the I/O protocol handles that.
    2760
    2861I/O protocol is line-based, what means you should process ''whole lines''.
     
    67100Everything that a chain writes to stderr is logged, prefixed with contact full name.
    68101
    69 == Options and configuration ==
    70 Main features of jabbot are configured using Flatconf. The bot directory must have an "fc/" subdirectory being a valid data tree conforming to schema of "jabbot" (delivered with jabbot source code in flatconf/jabbot/).
     102= Source code =
     103Beta-quality code is available at http://git.asn.pl/
    71104
    72 Run jabbot with "--help" option to learn about its command-line arguments.
     105Jabbot has been written by Pawel Foremski. You may try to reach me at pjf@asn.pl.