diff --git a/README.rst b/README.rst index d138982..dc66d3e 100644 --- a/README.rst +++ b/README.rst @@ -141,6 +141,19 @@ issuing the ``clean`` command (with no argument). Example usage:: #ironic clean +etherpad +-------- + +By default the bot generates etherpad links for all tracks. If you already +have an etherpad, you can set its URL using the ``etherpad`` command:: + + #keystone etherpad https://etherpad.openstack.org/p/awesome-keystone-pad + +If you set a URL and would like to revert to the autogenerated name, you can +pass ``auto`` as the etherpad URL:: + + #keystone etherpad auto + color ----- @@ -229,7 +242,7 @@ In one terminal, run the bot:: Join that channel and give commands to the bot:: - ~fetchdb http://paste.openstack.org/raw/755516/ + ~fetchdb http://paste.openstack.org/raw/755522/ #swift now discussing ring placement (note, the bot currently only takes commands from Freenode identified users) diff --git a/html/etherpads.html b/html/etherpads.html new file mode 100644 index 0000000..847bf3a --- /dev/null +++ b/html/etherpads.html @@ -0,0 +1,47 @@ + + + + + + List of PTG Etherpads + + + + +
+

List of PTG Etherpads

+

We use etherpads to track the agenda of topics that should be covered in +each track.

+

+
+
+ + + + + + + + + diff --git a/html/index.html b/html/index.html index 43d3444..b1b479d 100644 --- a/html/index.html +++ b/html/index.html @@ -19,6 +19,7 @@ diff --git a/ptgbot/bot.py b/ptgbot/bot.py index 1916650..158a4ac 100644 --- a/ptgbot/bot.py +++ b/ptgbot/bot.py @@ -311,6 +311,8 @@ class PTGBot(SASL, SSL, irc.bot.SingleServerIRCBot): self.notify(track, adverb, params) elif adverb == 'clean': self.data.clean_tracks([track]) + elif adverb == 'etherpad': + self.data.add_etherpad(track, params) elif adverb == 'color': self.data.add_color(track, params) elif adverb == 'location': diff --git a/ptgbot/db.py b/ptgbot/db.py index 61060c3..560bd71 100644 --- a/ptgbot/db.py +++ b/ptgbot/db.py @@ -28,10 +28,12 @@ class PTGDataBase(): 'slots': OrderedDict(), 'now': OrderedDict(), 'next': OrderedDict(), + 'etherpads': OrderedDict(), 'colors': OrderedDict(), 'location': OrderedDict(), 'schedule': OrderedDict(), 'voice': 0, + 'eventid': '', 'motd': {'message': '', 'level': 'info'}, 'links': OrderedDict(), # Keys for last_check_in are lower-cased nicks; @@ -80,6 +82,13 @@ class PTGDataBase(): del self.data['next'][track] self.save() + def add_etherpad(self, track, etherpad): + if etherpad == 'auto': + del(self.data['etherpads'][track]) + else: + self.data['etherpads'][track] = etherpad + self.save() + def add_color(self, track, color): self.data['colors'][track] = color self.save()