he is modular, extensible, multi-threaded (for network independence!), and configurable.
pybot runs on python 2.7 and >3.5, on both windows and linux, though current development is all geared towards >3.5.
master branch should be stable. feature branches can be broken at any time.
docker build . -t pybox
docker run -it pybox --nick <botnick> --server <yourserver> --port 6667 --channels "#c1, #c2" --owner <yournick>
Take care of dependencies. If you don't use MySQL and don't care about certain modules breaking, you don't need anything but python 2.7/3.5 and standard libs.
python -m venv pybot-venv
source pybot-venv/bin/activate
# so as to not stuff pips everywhere
pip install -r requirements.txt
- python-dev
- libmysqlclient-dev (aka mysql-python in pip)
- requests (used in a variety of modules)
- praw (for reddit info module)
- mysql-python (if you do use mysql)
- sphinx (for docs)
- python-twitter (twitterposter)
- pytz (tzone)
- Copy pybotrc to the user who will run the bot (you can probably do
cp pybotrc ~/.pybotrc
) - Modify ~/.pybotrc with your network, owner, and nickname.
./pybot.py
- laugh at mysql guys.
- continue laughing.
- for debugging purposes,
./pybot.py -d.
- modify pybotrc with your channels and passwords.
- run
sudo ./bootstrap.sh
to install pybot dependencies such as mysql. - run
./setup.sh
. It will check for module dependencies and create a mysql_init file.mysql -p < mysql\_init
./pybot.py pybotrc
- rejoice.
- for debugging purposes,
./pybot.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, ./pybot.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.
- add birthday module (save birthdays for your channel regulars!)
- update scheduler to accept at commands - .schedule at 5pm say #development pick your child from daycare