From b7686d4812a2552dcef110249a0f9d55dc11dd99 Mon Sep 17 00:00:00 2001 From: Florian RICHER Date: Sun, 1 May 2022 01:44:13 +0200 Subject: [PATCH] Update + begin think for docker container --- README.md | 4 ++++ resources/neurons/run_app/run_app.py | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08a9b9f..8d98f46 100644 --- a/README.md +++ b/README.md @@ -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 ``` diff --git a/resources/neurons/run_app/run_app.py b/resources/neurons/run_app/run_app.py index ff12808..0425fea 100644 --- a/resources/neurons/run_app/run_app.py +++ b/resources/neurons/run_app/run_app.py @@ -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: