From fd1a6e1afcb5c7c8626c6dd0710a2332f13cc628 Mon Sep 17 00:00:00 2001 From: Mathieu B Date: Mon, 2 Aug 2021 12:01:32 +0200 Subject: [PATCH] started working on timer skill --- jarvis/skills/daily/timer/__init__.py | 16 ++++++++++++++++ .../skills/daily/timer/regex/fr-fr/only_time.rx | 1 + .../daily/timer/regex/fr-fr/time_and_name.rx | 1 + .../daily/timer/vocab/fr-fr/start_timer.intent | 2 ++ .../daily/timer/vocab/fr-fr/time_unit.entity | 6 ++++++ 5 files changed, 26 insertions(+) create mode 100644 jarvis/skills/daily/timer/__init__.py create mode 100644 jarvis/skills/daily/timer/regex/fr-fr/only_time.rx create mode 100644 jarvis/skills/daily/timer/regex/fr-fr/time_and_name.rx create mode 100644 jarvis/skills/daily/timer/vocab/fr-fr/start_timer.intent create mode 100644 jarvis/skills/daily/timer/vocab/fr-fr/time_unit.entity diff --git a/jarvis/skills/daily/timer/__init__.py b/jarvis/skills/daily/timer/__init__.py new file mode 100644 index 0000000..e1e61f1 --- /dev/null +++ b/jarvis/skills/daily/timer/__init__.py @@ -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) diff --git a/jarvis/skills/daily/timer/regex/fr-fr/only_time.rx b/jarvis/skills/daily/timer/regex/fr-fr/only_time.rx new file mode 100644 index 0000000..b4e83e9 --- /dev/null +++ b/jarvis/skills/daily/timer/regex/fr-fr/only_time.rx @@ -0,0 +1 @@ +(?:de|pour dans|pour) (?.+) \ No newline at end of file diff --git a/jarvis/skills/daily/timer/regex/fr-fr/time_and_name.rx b/jarvis/skills/daily/timer/regex/fr-fr/time_and_name.rx new file mode 100644 index 0000000..bd21612 --- /dev/null +++ b/jarvis/skills/daily/timer/regex/fr-fr/time_and_name.rx @@ -0,0 +1 @@ +(?:de|pour dans|pour) (?