From 572e89794aa198c9e60deda26bea3e8ac453ca33 Mon Sep 17 00:00:00 2001 From: Mathieu B Date: Fri, 30 Jul 2021 12:28:42 +0200 Subject: [PATCH] Added create_skill to spotify skill and wikipedia --- jarvis/skills/entertainement/spotify/__init__.py | 6 +++++- jarvis/skills/research/wikipedia/__init__.py | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/jarvis/skills/entertainement/spotify/__init__.py b/jarvis/skills/entertainement/spotify/__init__.py index 17cd3c0..05c7e6f 100644 --- a/jarvis/skills/entertainement/spotify/__init__.py +++ b/jarvis/skills/entertainement/spotify/__init__.py @@ -35,6 +35,10 @@ class SpotifySkill(Skill, metaclass=SkillRegistering): song_name = current_playback['item']['name'] artist = current_playback['item']['artists'][0]['name'] - print(song_name + " from " + artist ) + print(song_name + " from " + artist) print("[INFO INTENT] - Current playback : music for Spotify") + + +def create_skill(): + return SpotifySkill() diff --git a/jarvis/skills/research/wikipedia/__init__.py b/jarvis/skills/research/wikipedia/__init__.py index 205b76d..db101ea 100644 --- a/jarvis/skills/research/wikipedia/__init__.py +++ b/jarvis/skills/research/wikipedia/__init__.py @@ -11,3 +11,7 @@ class WikipediaSkill(Skill, metaclass=SkillRegistering): @intent_handler(IntentBuilder("WikipediaQueryIntent").require("Wikipedia").require("ArticleTitle")) def handle_wikipedia_query_intent(self, data): print("Handle Wikipedia Query Intent Method") + + +def create_skill(): + return WikipediaSkill()