Brak opisu http://bits.zero9f9.com/pybot
Daniel Laudel e668460a40 This is still a work in progress and is not functional. Just lost access for a while and need a savepoint. | 9 lat temu | |
---|---|---|
docs | 10 lat temu | |
modules | 9 lat temu | |
tests | 9 lat temu | |
.gitignore | 10 lat temu | |
.travis.yml | 10 lat temu | |
CHANGES | 10 lat temu | |
Makefile | 10 lat temu | |
README.md | 10 lat temu | |
Vagrantfile | 10 lat temu | |
bootstrap.sh | 10 lat temu | |
bot.py | 10 lat temu | |
botbrain.py | 9 lat temu | |
conf.py | 10 lat temu | |
conferror.py | 11 lat temu | |
confman.py | 10 lat temu | |
db.py | 10 lat temu | |
event.py | 9 lat temu | |
index.rst | 10 lat temu | |
lite.py | 10 lat temu | |
logger.py | 10 lat temu | |
mysql_dump | 10 lat temu | |
pybotrc | 10 lat temu | |
requirements.txt | 10 lat temu | |
setup.sh | 10 lat temu | |
stats.py | 11 lat temu | |
ubuntu.sh | 10 lat temu | |
util.py | 10 lat temu | |
version.py | 10 lat temu | |
webwriter.py | 10 lat temu |
he is modular, extensible, multi-threaded, and configurable.
pybot runs on python 2.6 and 2.7, on both windows and linux. python versions > 3 are in the works.
cp pybotrc ~/.pybotrc
)./bot.py
./bot.py -d.
sudo ./bootstrap.sh
to install pybot dependencies such as mysql../setup.sh
. It will check for module dependencies and create a mysql_init file. mysql -p < mysql_init
./bot.py pybotrc
./bot.py -d.
Add a mysql user for pybot with permissions to update, insert, and delete from the created tables.
Logged into mysql: grant all on <dbname>.* to '<username>' identified by '<password>';
Run the included mysql_dump file (as root, mysql -p <pybot's database name> < mysql_dump
).
Set his dbpass in the config file (pybotrc) to the password you've given him.
Copy that config file to the home folder of whatever user will be running the bot. (~user/.pybotrc)
As that user, ./bot.py.
If you have Vagrant locally installed and configured, you can set up pybot by invoking
vagrant up
. Your development environment will be configured, and you can skip step 1 and
2 above. After that, SSH into your VM and do steps 3 through 5 to finish things off.
Here pybot is connected to two networks at once. They are held entirely separately. Modules loaded on one are independent of modules loaded on another. If one server goes down, the other connections to other networks are unaffected.