Skip to main content

OB is a pure python3 event handler and uses a timestamped, type in filename, JSON stringified, files on filesystem backend.

Project description

R E A D M E ###########

| OB is a pure python3 event handler and uses a timestamped, type in filename, JSON stringified, files on filesystem backend. | OB has been placed in the Public Domain and contains no copyright or LICENSE.

C O D E

.. autosummary:: :toctree: code :template: module.rst

ob
ob.clk
ob.dbs
ob.dpt
ob.err
ob.evt
ob.flt
ob.hdl
ob.krn
ob.ldr
ob.log
ob.shl
ob.thr
ob.typ
ob.usr
ob.utl

I N S T A L L

if you need ZELF to have access to your local directory use this:

export PYTHONPATH="."

this will add your current directory to the pythonpath so the packages in it can be found by ZELF.

installation is through pypi:

sudo pip3 install ob

you can also run the bot from the tarball at pypi and run it directly or install with setup.py:

python3 setup.py install --user

running from the mercurial repository is also possible:

hg clone http://bitbucket.org/bthate/ob

lastely, you can also run directly from the tarball.

U S A G E

OB includes one program, the ob shell:

ob [-m mod1,mod2] command

P R O G R A M M I N G

programming your own commands is easy, your can load modules with the -m option. if you create a mods directory and put your hello.py module in it, you would use:

ob -m mods

any command you have coded in hello.py would be available, see the cmds command.

ob cmds

a command is a function with one argument, the event that was generated on the bot.

example:

::

def mycmd(event): <your code here>

you can use event.reply() to send response back to the user:

::

def hello(event): event.reply("hello %s" % event.nick)

after starting ob with -m mods, you see the hello command added to the bot:

ob s cmds

cmds,hello

H A V E F U N

enjoy the coding ! ;]

Bart

bthate@dds.nl | botfather #dunkbots irc.freenode.net | https://pypi.org/project/ob | http://bitbucket.org/bthate/ob

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ob, version 27
Filename, size File type Python version Upload date Hashes
Filename, size ob-27.tar.gz (16.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page