reading and repeating script name
This commit is contained in:
parent
f38e2b43cc
commit
4a0283c870
|
@ -1,17 +1,16 @@
|
||||||
from adapt.intent import IntentBuilder
|
|
||||||
from mycroft import MycroftSkill, intent_handler
|
from mycroft import MycroftSkill, intent_handler
|
||||||
|
|
||||||
class RunScriptSkill(MycroftSkill):
|
class RunScriptSkill(MycroftSkill):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.learning = true
|
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
script_dir = self.settings.get('script_dir')
|
script_dir = self.settings.get('script_dir')
|
||||||
|
|
||||||
@intent_handler(IntentBuilder('RunScriptIntent').require('RunScriptKeyword'))
|
@intent_handler('RunScript.intent')
|
||||||
def handle_run_script_intent(self, message):
|
def handle_run_script_intent(self, msg=None):
|
||||||
self.speak_dialog("running")
|
script = msg.data.get('script', None)
|
||||||
|
self.speak_dialog('Running', {'script': script})
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Okay. I'm running the {{script}} script.
|
|
@ -1 +0,0 @@
|
||||||
Okay. I'm running the script.
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
(run|execute) (the|my|your) {script} script
|
||||||
|
(run|execute) {script} script
|
|
@ -1,6 +0,0 @@
|
||||||
run script
|
|
||||||
run the script
|
|
||||||
run my script
|
|
||||||
execute script
|
|
||||||
execute the script
|
|
||||||
execute my script
|
|
Loading…
Reference in New Issue