Exemplo n.º 1
0
 def __init__(self, mainclass):
     RegexAction.__init__(self,self._schelude_task)
     self.name = "GetTimeAction" + str(self.uid)
     self.message_manager = mainclass.message_manager
     self.tasks = mainclass.tasks
     self.profile = mainclass.profile
     self.pattern = r'(?:avisame) (?:que|de) (\w+) en (\d+)(m| minutos|s| segundos)'
Exemplo n.º 2
0
 def matches(self, s):
     return RegexAction.matches(self,self.pattern,s)
Exemplo n.º 3
0
 def matches(self, s):
     pattern = r'tengo que (.*)'
     return RegexAction.matches(self,pattern,s)
Exemplo n.º 4
0
 def __init__(self, main):
     RegexAction.__init__(self,self._set_task)
     self.name = "SetTaskAction" + str(self.uid)
     self.message_manager = main.message_manager
     self.todo_manager = main.todo_manager
Exemplo n.º 5
0
 def matches(self, s):
     pattern = r'^Que tengo (?:que hacer|pendiente(?: para hacer)*) *\?'
     return RegexAction.matches(self,pattern,s)
Exemplo n.º 6
0
 def __init__(self, main):
     RegexAction.__init__(self,self._get_time)
     self.name = "GetTimeAction" + str(self.uid)
     self.message_manager = main.message_manager
Exemplo n.º 7
0
 def matches(self, s):
     pattern = r'(?:dime|decime|dame) (?:la hora|que hora es)'
     return RegexAction.matches(self,pattern,s)
Exemplo n.º 8
0
 def __init__(self, main):
     RegexAction.__init__(self,self._set_name)
     self.name = "SetNameAction" + str(self.uid)
     self.message_manager = main.message_manager
     self.main = main
Exemplo n.º 9
0
 def matches(self, s):
     pattern = r'(?:Me llamo|Llamame|Mi nombre es) (\w*)'
     return RegexAction.matches(self,pattern,s)