forked from PyCon/pc-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
WELCOME TO THE THUNDERDOME
License
lvh/pc-bot
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Tools for PyCon-PC IRC meetings =============================== Helpful tools for running the PyCon Program Commitee process. This runs and IRC bot we use during meetings, and a web interface to the review data. Setup ===== First, the usual: pip install -r requirements.txt Then, rhe best way to configure this thing is through some environ variables (there are flags, but env is easier):: export MONGO_DSN=mongodb://... export PYCONBOT_SUPERUSERS=list,of,irc,superusers If you want to protect the web interface with (basic) auth:: export PYCONBOT_BASIC_AUTH=username:password (Yeah it's kinda janky. What. Ev. Er.) The web app can be run in debug mode:: export PYCONBOT_DEBUG=1 Then to run the bot: python runbot.py This runs both the IRC client and the web server. See the `--help` for connecting to other channels, listening on other HTTP ports, etc. The scripts need to be able to import stuff from `pycon_bot`, so I usually export PYTHONPATH=`pwd` python scripts/agenda.py Or somesuch. Architecture ============ Some brief notes on how all the bits fit together: * `runbot.py` launches an IRC "driver" (`pycon_bot.driver.PyConBot`). This bot doesn't do much itself besides provide some utilities. Instead, almost all bot commands get delegated down to a "mode" object. * A "mode" lives in `pycon_bot.modes.<whatever>` It should subclass `pycon_bot.modes.base.BaseBotMode`, and the mode needs to be named, e.g., `WhateverMode` if it lives in `pycon_bot.modes.whatever`. * The ",mode" command switches between modes - see `pycon_bot.driver.PyConBot.handle_mode`. Giving invalid modes fails in predictable ways, and since it imports arbitrary code you probably want to be careful about where you run this and who gets SU! * `runbot.py` also launches a web app, written using Flask. See `pycon_bot.web.app`. Running IN THE CLOUDS! ====================== You can run this bad boy on Heroku:: heroku create <appname> git push heroku master heroku config:set MONGO_DSN=mongodb://... heroku config:set PYCONBOT_SUPERUSERS=me,myself,andI heroku config:set PYCONBOT_BASIC_AUTH=username:password Then to change code just do the standard `git push heroku master`.
About
WELCOME TO THE THUNDERDOME
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 99.3%
- CSS 0.7%