diff --git a/README.md b/README.md
index d387f2f..a08fc18 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
#
Hello World
Introductory Skill so that Skill Authors can see how a Mycroft Skill is put together
-## About
-This is a basic Hello Word Skill that takes an _Utterance_ from the user and provides a voice response - a _Dialog_. This Skill demonstrates the basic directory and file structure of a Mycroft Skill, and is a good first Skill to study if you are interested in developing Skills for the Mycroft ecosystem.
+## About
+This is a basic Hello Word Skill that takes an _Utterance_ from the user and provides a voice response - a _Dialog_. This Skill demonstrates the basic directory and file structure of a Mycroft Skill, and is a good first Skill to study if you are interested in developing Skills for the Mycroft ecosystem.
-If you want to write **Skills** for Mycroft, Documentation is available:
+If you want to write **Skills** for Mycroft, Documentation is available:
* [Mycroft Skills Kit](https://mycroft.ai/documentation/skills/msk/)
* [Developing a new Skill](https://mycroft.ai/documentation/skills/introduction-developing-skills/)
@@ -14,16 +14,16 @@
* [Mycroft Skills Manager](https://mycroft.ai/documentation/msm/)
* [Mycroft Message Bus](https://mycroft.ai/documentation/message-bus/)
-## Examples
+## Examples
* "Hello world"
* "How are you?"
* "Thank you"
-## Credits
+## Credits
Mycroft AI (@MycroftAI)
## Category
-**Daily**
+**Configuration**
## Tags
#helloworld
diff --git a/__init__.py b/__init__.py
index 446ef9b..07a412b 100644
--- a/__init__.py
+++ b/__init__.py
@@ -16,41 +16,42 @@
# along with Mycroft Core. If not, see .
from adapt.intent import IntentBuilder
-
-from mycroft.skills.core import MycroftSkill
-from mycroft.util.log import getLogger
-
-__author__ = 'eward'
-
-LOGGER = getLogger(__name__)
-
+from mycroft import MycroftSkill, intent_file_handler, intent_handler
class HelloWorldSkill(MycroftSkill):
def __init__(self):
- super(HelloWorldSkill, self).__init__(name="HelloWorldSkill")
+ """ The __init__ method is called when the Skill is first constructed.
+ It is often used to declare variables or perform setup actions, however
+ it cannot utilise MycroftSkill methods as the class does not yet exist.
+ """
+ super().__init__()
+ self.learning = True
def initialize(self):
- thank_you_intent = IntentBuilder("ThankYouIntent"). \
- require("ThankYouKeyword").build()
- self.register_intent(thank_you_intent, self.handle_thank_you_intent)
+ """ Perform any final setup needed for the skill here.
+ This function is invoked after the skill is fully constructed and
+ registered with the system. Intents will be registered and Skill
+ settings will be available."""
+ my_setting = self.settings.get('my_setting')
- how_are_you_intent = IntentBuilder("HowAreYouIntent"). \
- require("HowAreYouKeyword").build()
- self.register_intent(how_are_you_intent,
- self.handle_how_are_you_intent)
-
- hello_world_intent = IntentBuilder("HelloWorldIntent"). \
- require("HelloWorldKeyword").build()
- self.register_intent(hello_world_intent,
- self.handle_hello_world_intent)
-
+ @intent_handler(IntentBuilder('ThankYouIntent').require('ThankYouKeyword'))
def handle_thank_you_intent(self, message):
+ """ This is an Adapt intent handler, it is triggered by a keyword."""
self.speak_dialog("welcome")
+ @intent_file_handler('HowAreYou.intent')
def handle_how_are_you_intent(self, message):
+ """ This is a Padatious intent handler.
+ It is triggered using a list of sample phrases."""
self.speak_dialog("how.are.you")
+ @intent_handler(IntentBuilder('HelloWorldIntent')
+ .require('HelloWorldKeyword'))
def handle_hello_world_intent(self, message):
+ """ Skills can log useful information. These will appear in the CLI and
+ the skills.log file."""
+ self.log.info("There are five types of log messages: "
+ "info, debug, warning, error, and exception.")
self.speak_dialog("hello.world")
def stop(self):
diff --git a/vocab/en-us/HowAreYou.intent b/vocab/en-us/HowAreYou.intent
new file mode 100644
index 0000000..143a400
--- /dev/null
+++ b/vocab/en-us/HowAreYou.intent
@@ -0,0 +1,3 @@
+how are you
+how have you been
+how has your day been
diff --git a/vocab/en-us/HowAreYouKeyword.voc b/vocab/en-us/HowAreYouKeyword.voc
deleted file mode 100644
index 143a400..0000000
--- a/vocab/en-us/HowAreYouKeyword.voc
+++ /dev/null
@@ -1,3 +0,0 @@
-how are you
-how have you been
-how has your day been