OB is a pure python3 event handler and uses a timestamped, type in filename, JSON stringified, files on filesystem backend.
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:
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.
a command is a function with one argument, the event that was generated on the bot.
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
H A V E F U N
enjoy the coding ! ;]
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|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|