started working on timer skill

This commit is contained in:
Mathieu B 2021-08-02 12:01:32 +02:00
parent 95db3f0cee
commit fd1a6e1afc
5 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,16 @@
from jarvis.skills import Skill, SkillRegistering
from jarvis.skills.decorators import intent_file_handler
class TimerSkill(Skill, metaclass=SkillRegistering):
def __init__(self, data=dict):
super().__init__("TimerSkill", data)
@intent_file_handler("start_timer.intent", "StartTimerIntent")
def handle_start_timer(self, data):
print(data)
pass
def create_skill(data):
return TimerSkill(data)

View File

@ -0,0 +1 @@
(?:de|pour dans|pour) (?<TimeOnly>.+)

View File

@ -0,0 +1 @@
(?:de|pour dans|pour) (?<Time>.+)(?:(?:nommé|appelé|qui s'appelle|et appelle le) (?<Name>.*)?)

View File

@ -0,0 +1,2 @@
(Mets|Lance) un minuteur (de|pour dans|pour) {amount} {time_unit}
Lance un minuteur de {amount} {time_unit} (nommé|appelé|qui s'appelle|et appelle le) {name}

View File

@ -0,0 +1,6 @@
seconde
secondes
minute
minutes
heure
heures