Source code for the PTG event scheduling bot
Go to file
Thierry Carrez cca73956da Add room name validation
Rooms must match a defined set of active rooms.

Add !add !del !list commands in order to manage the room list.
Also add a !clean command to remove session entries from a given
set of rooms. All commands take a list of rooms as argument.

Change-Id: I4130c49cc2a3985c440d5b9205f1900daaf46d3d
2017-06-13 11:40:47 +02:00
html Render hashtags using labels 2017-05-29 17:13:00 +02:00
ptgbot Add room name validation 2017-06-13 11:40:47 +02:00
.gitignore Add basic HTML output system 2017-04-20 18:00:26 +02:00
.gitreview Fix .gitreview to match code repository 2017-06-13 11:40:47 +02:00
LICENSE Initial commit 2017-04-18 14:21:26 +02:00
README.rst Make ethercalc support optional 2017-05-29 17:21:43 +02:00
config.ini.sample Add basic support for loading up ethercalc data 2017-05-29 16:36:37 +02:00
requirements.txt Initial commit 2017-04-18 14:21:26 +02:00
setup.cfg Initial commit 2017-04-18 14:21:26 +02:00
setup.py Initial commit 2017-04-18 14:21:26 +02:00
test-requirements.txt Initial commit 2017-04-18 14:21:26 +02:00
tox.ini Initial commit 2017-04-18 14:21:26 +02:00

README.rst

OpenStack PTG Bot

ptgbot is the bot that PTG room moderators use to surface what's currently happening at the event. Commands follow the following format:

#ROOMNAME [now|next] TOPIC

From that information the bot builds a static webpage with discussion topics currently discussed ("now") and an indicative set of discussion topics coming up next ("next").

Please note that:

  • There can only be one "now" topic at a time. If multiple topics are discussed at the same time in various corners of the room, they should all be specified in a single "now" command.
  • In order to ensure that information is current, entering a "now" command wipes out any "next" entry for the same room. You might want to refresh those after entering a "now" topic.

Example:

#swift now discussing ring placement
#swift next at 2pm we plan to discuss #glance support
#swift next around 3pm we plan to cover cold storage features
...
#swift now discussing #glance support, come over!
#swift next at 3pm we plan to cover cold storage features

Testing

Copy config.ini.sample to config.ini:

cp config.ini.sample config.ini

Edit config.ini contents, for example:

[ircbot]
nick=ptgbot
pass=
server=irc.freenode.net
port=6667
channels=testptg

[db]
filename=html/ptg.json
ethercalc=
cells=

In one terminal, run the bot:

tox -evenv -- ptgbot -d config.ini

Join that channel and give a command to the bot:

#swift now discussing ring placement

(note, the bot currently only takes commands from Freenode identified users)

In another terminal, start the webserver:

cd html && python -m SimpleHTTPServer

Open the web page in a web browser: http://127.0.0.1:8000/ptg.html