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.
|
||||
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
|
||||
sudo ./fix_snowboy_bin.sh
|
||||
```
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
import subprocess
|
||||
import os
|
||||
import logging
|
||||
|
||||
from kalliope.core import NeuronModule
|
||||
from kalliope.core.NeuronModule import MissingParameterException, MissingParameterException
|
||||
|
||||
logging.basicConfig()
|
||||
logger = logging.getLogger("kalliope")
|
||||
|
||||
home_dir = os.path.expanduser('~')
|
||||
|
||||
entries_dirs = [
|
||||
|
@ -28,7 +32,7 @@ def check_file(file_path, query):
|
|||
if query.lower() in line.lower():
|
||||
found = True
|
||||
if exec is not None and found is True:
|
||||
return exec
|
||||
return exec.split(" ")[0]
|
||||
return None
|
||||
|
||||
def search_app_name_in_desktop_entries(query: str):
|
||||
|
@ -52,6 +56,7 @@ class Run_app(NeuronModule):
|
|||
if self._is_parameters_ok():
|
||||
result = search_app_name_in_desktop_entries(self.query)
|
||||
if result is not None:
|
||||
logger.debug("EXEC: %s" % result)
|
||||
subprocess.Popen(result, shell=True)
|
||||
self.say(self.found_message)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue