No Description http://bits.zero9f9.com/pybot

Matt Weller 8f08f413b6 add lite docs 10 years ago
docs 8f08f413b6 add lite docs 10 years ago
modules 03136670ef remove some pritns from debugger 10 years ago
tests 0ca55f360c misc. core fixes. includes: 10 years ago
.gitignore 1f032a41ad remove all teh old bf3 stuff 10 years ago
.travis.yml 89ebddf21e remove python 2.6 so it stops failing in steamapi 11 years ago
CHANGES 24cef71530 add sqlite functionality. fixes #3, after a long, long time 10 years ago
Makefile 1f032a41ad remove all teh old bf3 stuff 10 years ago
README.md b4c0fb33ed typo 10 years ago
Vagrantfile 3e44c8e9f9 Automate development environment configuration 10 years ago
bootstrap.sh 3e44c8e9f9 Automate development environment configuration 10 years ago
bot.py 5f40a4f085 fix bug where bot would connect to only one network when in debug mode 10 years ago
botbrain.py 24cef71530 add sqlite functionality. fixes #3, after a long, long time 10 years ago
conf.py faa14939f3 sphinx is ignoring my order to exclude :( 10 years ago
conferror.py 9945b98ebd create dev branch. work on confman, which is currently correctly parsing ~/.pybotrc and setting internal variables. add some try excepts on connecting to the socket 12 years ago
confman.py b4c0a16948 fix bug where bot would try to connect to __pybot_conf and fail to pull values for that network from teh conf 10 years ago
db.py aa89ebdfdf fix bug where it would not respect admins from the db 10 years ago
event.py 9aa7c9803e add some docs to event.py 10 years ago
index.rst e2315aac1d add source link in index.rst 10 years ago
lite.py aa89ebdfdf fix bug where it would not respect admins from the db 10 years ago
logger.py 97c100bc01 add permission (ish) check to logger.py 10 years ago
mysql_dump 85fac2f4d4 fix debug log output in bot.py, fix poor programming in nicklist (still not fully functional), fix mysql_dump missing a few tables. 10 years ago
pybotrc 24cef71530 add sqlite functionality. fixes #3, after a long, long time 10 years ago
requirements.txt b9f8754210 add triggering by user to event, add module to post to twitter upon certain events 10 years ago
setup.sh 3d1a70facb add setup.sh and modify README to tell people to use it 11 years ago
stats.py 5951643a37 begin work on stats, i guess, and fix a few typos in webwriter. remove extraneous print from botbrain, too 12 years ago
ubuntu.sh f6de3aaa5e rollback import changes and re-add ubuntu.sh script 10 years ago
util.py fce0cceb5c fix python being mad that i didn't indent my comments 10 years ago
version.py 76e6271954 centralize version string to version.py 10 years ago
webwriter.py 24cef71530 add sqlite functionality. fixes #3, after a long, long time 10 years ago

README.md

Build Status

ReadTheDocs documentation

pybot is a python irc bot. he is a project.

he is modular, extensible, multi-threaded, and configurable.

pybot runs on python 2.6 and 2.7 (though steamapi does not work with 2.6, the core bot does). python versions > 3 are in the works.

(Now probably more than) 10-second TL;DR:

Take care of dependencies. If you don't use MySQL and don't care about twitter posting or reddit info, you don't need anything but python 2.6 or 2.7 and standard libs.

  • libmysqlclient-dev (aka mysql-python in pip)
  • requests
  • praw (for reddit info module)
  • mysql-python (if you do use mysql)
  • sphinx (for docs)
  • python-twitter (twitterposter)

Local Development (with sqlite3)

  1. Copy pybotrc to the user who will run the bot (you can probably do cp pybotrc ~/.pybotrc)
  2. Modify ~/.pybotrc with your network, owner, and nickname.
  3. ./bot.py
  4. laugh at mysql guys.
  5. continue laughing.
  6. for debugging purposes, ./bot.py -d.

Local Development (with MySQL)

  1. modify pybotrc with your channels and passwords.
  2. run sudo ./bootstrap.sh to install pybot dependencies such as mysql.
  3. run ./setup.sh. It will check for module dependencies and create a mysql_init file. mysql -p < mysql_init
  4. ./bot.py pybotrc
  5. rejoice.
  6. for debugging purposes, ./bot.py -d.

Manual

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.

Vagrant Development

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.

Images & Explanation

debug mode

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.

youtube module

a totally not contrived example