Update + begin think for docker container
This commit is contained in:
parent
b8ab8d254f
commit
b7686d4812
2 changed files with 10 additions and 1 deletions
|
@ -6,6 +6,10 @@ This starter kit has been tested with the version v0.5.0 of Kalliope.
|
||||||
If you have error with _snowboydetect kalliope can not import _snowboydetect.so with you current version of python.
|
If you have error with _snowboydetect kalliope can not import _snowboydetect.so with you current version of python.
|
||||||
Too fix it, you can use script in bellow
|
Too fix it, you can use script in bellow
|
||||||
|
|
||||||
|
NOTE: https://hub.docker.com/r/kalliope/kalliope_ubuntu
|
||||||
|
NOTE: https://hub.docker.com/r/alphacep/kaldi-fr
|
||||||
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo ./fix_snowboy_bin.sh
|
sudo ./fix_snowboy_bin.sh
|
||||||
```
|
```
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
|
import logging
|
||||||
|
|
||||||
from kalliope.core import NeuronModule
|
from kalliope.core import NeuronModule
|
||||||
from kalliope.core.NeuronModule import MissingParameterException, MissingParameterException
|
from kalliope.core.NeuronModule import MissingParameterException, MissingParameterException
|
||||||
|
|
||||||
|
logging.basicConfig()
|
||||||
|
logger = logging.getLogger("kalliope")
|
||||||
|
|
||||||
home_dir = os.path.expanduser('~')
|
home_dir = os.path.expanduser('~')
|
||||||
|
|
||||||
entries_dirs = [
|
entries_dirs = [
|
||||||
|
@ -28,7 +32,7 @@ def check_file(file_path, query):
|
||||||
if query.lower() in line.lower():
|
if query.lower() in line.lower():
|
||||||
found = True
|
found = True
|
||||||
if exec is not None and found is True:
|
if exec is not None and found is True:
|
||||||
return exec
|
return exec.split(" ")[0]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def search_app_name_in_desktop_entries(query: str):
|
def search_app_name_in_desktop_entries(query: str):
|
||||||
|
@ -52,6 +56,7 @@ class Run_app(NeuronModule):
|
||||||
if self._is_parameters_ok():
|
if self._is_parameters_ok():
|
||||||
result = search_app_name_in_desktop_entries(self.query)
|
result = search_app_name_in_desktop_entries(self.query)
|
||||||
if result is not None:
|
if result is not None:
|
||||||
|
logger.debug("EXEC: %s" % result)
|
||||||
subprocess.Popen(result, shell=True)
|
subprocess.Popen(result, shell=True)
|
||||||
self.say(self.found_message)
|
self.say(self.found_message)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue