Aucune description http://bits.zero9f9.com/pybot
Matt Weller 95ebc2a2e4 add functionality to replace printout urls with imgur mirrors in qdb submissions | il y a 10 ans | |
---|---|---|
docs | il y a 10 ans | |
modules | il y a 10 ans | |
tests | il y a 10 ans | |
.gitignore | il y a 10 ans | |
.travis.yml | il y a 10 ans | |
CHANGES | il y a 10 ans | |
Makefile | il y a 10 ans | |
README.md | il y a 10 ans | |
Vagrantfile | il y a 10 ans | |
bootstrap.sh | il y a 10 ans | |
bot.py | il y a 10 ans | |
botbrain.py | il y a 10 ans | |
conf.py | il y a 10 ans | |
conferror.py | il y a 11 ans | |
confman.py | il y a 10 ans | |
db.py | il y a 10 ans | |
event.py | il y a 10 ans | |
index.rst | il y a 10 ans | |
lite.py | il y a 10 ans | |
logger.py | il y a 10 ans | |
mysql_dump | il y a 10 ans | |
pybotrc | il y a 10 ans | |
requirements.txt | il y a 10 ans | |
setup.sh | il y a 10 ans | |
stats.py | il y a 11 ans | |
ubuntu.sh | il y a 10 ans | |
util.py | il y a 10 ans | |
version.py | il y a 10 ans | |
webwriter.py | il y a 10 ans |
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.