This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from ethanaward/feature/issues-86
Issues 86 - Add basic welcome skill
- Loading branch information
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright 2016 Mycroft AI, Inc. | ||
# | ||
# This file is part of Mycroft Core. | ||
# | ||
# Mycroft Core is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# Mycroft Core is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with Mycroft Core. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
from os.path import dirname | ||
|
||
from adapt.intent import IntentBuilder | ||
from mycroft.skills.core import MycroftSkill | ||
from mycroft.util.log import getLogger | ||
|
||
__author__ = 'eward' | ||
|
||
LOGGER = getLogger(__name__) | ||
|
||
|
||
class WelcomeSkill(MycroftSkill): | ||
|
||
def __init__(self): | ||
super(WelcomeSkill, self).__init__(name="WelcomeSkill") | ||
|
||
def initialize(self): | ||
self.load_data_files(dirname(__file__)) | ||
|
||
welcome_intent = IntentBuilder("WelcIntent").require("WelcKey").build() | ||
self.register_intent(welcome_intent, self.handle_welcome_intent) | ||
|
||
def handle_welcome_intent(self, message): | ||
self.speak_dialog('Welcome') | ||
|
||
def stop(self): | ||
pass | ||
|
||
|
||
def create_skill(): | ||
return WelcomeSkill() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
You're welcome. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
thank you | ||
thanks |