@@ -0,0 +1,1316 @@
+# pylint: disable=C0111,R0903%0A%0A%22%22%22Displays the unread github requests of a user%0A%0ARequires the following executable:%0A    * curl%0A%0AParameters:%0A    * github.token: GitHub user access token%0A    * github.interval: Interval in minutes%0A%22%22%22%0A%0Aimport bumblebee.input%0Aimport bumblebee.output%0Aimport bumblebee.engine%0Aimport re%0Aimport time%0A%0Aclass Module(bumblebee.engine.Module):%0A    def __init__(self, engine, config):%0A        super(Module, self).__init__(engine, config,%0A            bumblebee.output.Widget(full_text=self.github)%0A        )%0A        self._count = 0%0A        self._interval = int(self.parameter(%22interval%22, %225%22))%0A        self._nextcheck = 0%0A%0A    def github(self, widget):%0A        return self._count%0A%0A    def update(self, widgets):%0A        if self._nextcheck %3C int(time.time()):%0A            self._nextcheck = int(time.time()) + self._interval * 60%0A            token = self.parameter(%22token%22, %22%22)%0A%0A            if not token:%0A                 self._count = 0%0A                 return%0A%0A            result = bumblebee.util.execute(%22curl -s https://api.github.com/notifications%5C?access_token%5C=%22 + token)%0A%0A            pattern = 'unread'%0A            lines = '%5Cn'.join(re.findall(r'%5E.*%25s.*?$'%25pattern,result,flags=re.M))%0A%0A            self._count = len(lines.split('%5Cn'))%0A%0A# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4%0A

Add rudimentary GitHub unread messages module