forked from MycroftAI/mycroft-core
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
342 additions
and
28 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
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
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
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,7 @@ | ||
recursive-include dialog * | ||
recursive-include vocab * | ||
recursive-include locale * | ||
recursive-include res * | ||
recursive-include ui * | ||
include *.json | ||
include *.txt |
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,14 @@ | ||
from ovos_utils.intents import IntentBuilder | ||
from ovos_workshop.decorators import intent_handler | ||
from ovos_workshop.skills import OVOSSkill | ||
|
||
|
||
class ScheduleSkill(OVOSSkill): | ||
|
||
def handle_event(self, message): | ||
self.speak_dialog("trigger") | ||
|
||
@intent_handler(IntentBuilder("ScheduleIntent").require("Schedule")) | ||
def handle_sched_intent(self, message): | ||
self.speak_dialog("done") | ||
self.schedule_event(self.handle_event, 3, name="my_event") |
1 change: 1 addition & 0 deletions
1
test/end2end/session/skill-ovos-schedule/locale/en-us/dialog/done.dialog
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 @@ | ||
it has been scheduled |
1 change: 1 addition & 0 deletions
1
test/end2end/session/skill-ovos-schedule/locale/en-us/dialog/trigger.dialog
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 @@ | ||
this is the event triggering |
1 change: 1 addition & 0 deletions
1
test/end2end/session/skill-ovos-schedule/locale/en-us/vocab/Schedule.voc
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 @@ | ||
schedule event |
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,45 @@ | ||
#!/usr/bin/env python3 | ||
from os import walk, path | ||
|
||
from setuptools import setup | ||
|
||
URL = "https://github.com/OpenVoiceOS/skill-ovos-schedule" | ||
SKILL_CLAZZ = "ScheduleSkill" # needs to match __init__.py class name | ||
|
||
# below derived from github url to ensure standard skill_id | ||
SKILL_AUTHOR, SKILL_NAME = URL.split(".com/")[-1].split("/") | ||
SKILL_PKG = SKILL_NAME.lower().replace('-', '_') | ||
PLUGIN_ENTRY_POINT = f'{SKILL_NAME.lower()}.{SKILL_AUTHOR.lower()}={SKILL_PKG}:{SKILL_CLAZZ}' | ||
|
||
|
||
# skill_id=package_name:SkillClass | ||
|
||
|
||
def find_resource_files(): | ||
resource_base_dirs = ("locale", "ui", "vocab", "dialog", "regex", "skill") | ||
base_dir = path.dirname(__file__) | ||
package_data = ["*.json"] | ||
for res in resource_base_dirs: | ||
if path.isdir(path.join(base_dir, res)): | ||
for (directory, _, files) in walk(path.join(base_dir, res)): | ||
if files: | ||
package_data.append( | ||
path.join(directory.replace(base_dir, "").lstrip('/'), | ||
'*')) | ||
return package_data | ||
|
||
|
||
setup( | ||
name="ovos-skill-schedule", | ||
version="0.0.0", | ||
long_description="test", | ||
description='OVOS schedule skill plugin', | ||
author_email='[email protected]', | ||
license='Apache-2.0', | ||
package_dir={SKILL_PKG: ""}, | ||
package_data={SKILL_PKG: find_resource_files()}, | ||
packages=[SKILL_PKG], | ||
include_package_data=True, | ||
keywords='ovos skill plugin', | ||
entry_points={'ovos.plugin.skill': PLUGIN_ENTRY_POINT} | ||
) |
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
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
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
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
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
Oops, something went wrong.