Beispiel #1
0
 def rem(self):
     print self.what
     count=0
     time2=nt.to_natural_day_and_time(self.when_epoch)
     ny.show(self.what)
     while count<2:
         tts.speak("Sir,reminding you to {}".format(self.what))
         time.sleep(2)
         count+=1
Beispiel #2
0
 def context_matcher(self):
     if self.result.get("type")=='tickle':
         if self.result.get('subtype')=='push':
             pushes = self.pb.get_pushes()
             latest=pushes[1][0]
             if latest.get('target_device_iden')==PUSHBULLET_ID:
                 self.body=latest['body']
                 os.system('mpg321 {0} 2>/dev/null'.format(MESSAGE_FILE))
                 self.notify({'text':self.body})
                 ny.show(self.body)
Beispiel #3
0
 def answer(self, event, sender):
     reply=self.bot.reply("localuser", event)
     speak(str(reply))
     ny.show(reply)
     return True