added settings config
This commit is contained in:
parent
4a0283c870
commit
bb81a938e6
|
@ -5,7 +5,15 @@ class RunScriptSkill(MycroftSkill):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
|
self.settings_change_callback = self.on_settings_changed
|
||||||
|
self.on_settings_changed()
|
||||||
|
|
||||||
|
def on_settings_changed(self):
|
||||||
script_dir = self.settings.get('script_dir')
|
script_dir = self.settings.get('script_dir')
|
||||||
|
self.read_scripts_dir(script_dir)
|
||||||
|
|
||||||
|
def read_script_dir(self, script_dir):
|
||||||
|
pass
|
||||||
|
|
||||||
@intent_handler('RunScript.intent')
|
@intent_handler('RunScript.intent')
|
||||||
def handle_run_script_intent(self, msg=None):
|
def handle_run_script_intent(self, msg=None):
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"skillMetadata": {
|
||||||
|
"sections": [{
|
||||||
|
"name": "Scripts Location",
|
||||||
|
"fields": [{
|
||||||
|
"name": "script_dir",
|
||||||
|
"type": "text",
|
||||||
|
"label": "Directory containing scripts",
|
||||||
|
"value": "/home/pi/scripts"
|
||||||
|
}]
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue