Bez popisu http://bits.zero9f9.com/pybot

Matt Weller 0002c3fd76 working on bitbucket integration module před 10 roky
modules 0002c3fd76 working on bitbucket integration module před 10 roky
steamapi 49b3ab3e79 steam api and bot.mem_store před 10 roky
.gitignore 1606542114 update changes, gitignore, fix a few modules to have correct new init args, update version před 10 roky
CHANGES 0002c3fd76 working on bitbucket integration module před 10 roky
README.md baf84cd6be readme před 10 roky
__init__.py 6e79b5cf5c events and modules work. před 11 roky
ascii.py ea0ccc98f6 Refactoring into classes, adding a bf3 stat api call (buggy). před 12 roky
battlelog.py 4b60d05217 Added the ability to query stats from a player's most recent game. Pulls direct from battlelog and it's slow as heck. před 12 roky
bf3api.py ea0ccc98f6 Refactoring into classes, adding a bf3 stat api call (buggy). před 12 roky
bot.py 0002c3fd76 working on bitbucket integration module před 10 roky
botbrain.py bf98156c9f lots of cleanup, add severity levels to logger, fix api key in forecast.py, add some logging to module.py před 10 roky
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 před 11 roky
confman.py 71476c8913 fix casing typo in confman před 10 roky
db.py e71b2e9a0a cleanup redditinfo's output, make db actually insert channel into database před 10 roky
event.py 95a4bc88d4 add defining an event based on a line's content or a message's content před 10 roky
logger.py bf98156c9f lots of cleanup, add severity levels to logger, fix api key in forecast.py, add some logging to module.py před 10 roky
mysql_dump 8c0151b4f1 add mysql_dump and update README.md před 11 roky
pybotrc aa49a480af add back in default pybotrc před 10 roky
setup.sh 3d1a70facb add setup.sh and modify README to tell people to use it před 10 roky
stats.py 5951643a37 begin work on stats, i guess, and fix a few typos in webwriter. remove extraneous print from botbrain, too před 11 roky
webwriter.py 973d1d4696 its makedirs not mkdir. silly. před 10 roky

README.md

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

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

10-second TL;DR:

  1. modify pybotrc with your channels and passwords.
  2. Run ./setup.sh. It will check for dependencies and create a mysql_init file.
  3. ./bot.py pybotrc
  4. rejoice.

Longer explanation: pybot requires mysqldb. It's probably in your package manager. It will run without it, it'll just throw lots of exceptions. SQLite integration and no-db (pickle) support are in the works.

Automagic

Run ./setup.sh and follow the prompts. It will create a mysql_init file, which you can then run against mysql with mysql -p < mysql_init. This will create your database and add a user with full privileges on that database. Your bot will run as this user. Put that information into the pybotrc. If you do not run ./setup.sh you will have to perform the step below.


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.

This project uses smiley's steamapi for its steam integration, and PRAW (python reddit API wrapper) for the redditinfo module.