Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Issues 86 - Add basic welcome skill #87

Merged
merged 6 commits into from
Jun 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions mycroft/skills/welcome/__init__.py
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()
1 change: 1 addition & 0 deletions mycroft/skills/welcome/dialog/en-us/Welcome.dialog
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You're welcome.
2 changes: 2 additions & 0 deletions mycroft/skills/welcome/vocab/en-us/WelcKey.voc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
thank you
thanks