diff --git a/.github/workflows/end2end_tests.yml b/.github/workflows/end2end_tests.yml index e628d48bfac2..01e3bb714609 100644 --- a/.github/workflows/end2end_tests.yml +++ b/.github/workflows/end2end_tests.yml @@ -60,7 +60,6 @@ jobs: pip install ./test/end2end/skill-new-stop pip install ./test/end2end/skill-old-stop pip install ./test/end2end/skill-fake-fm - pip install ./test/end2end/skill-fake-fm-legacy pip install ./test/end2end/skill-ovos-fakewiki pip install ./test/end2end/metadata-test-plugin - name: Install core repo diff --git a/.github/workflows/license_tests.yml b/.github/workflows/license_tests.yml index de35365f64ad..4421436f0085 100644 --- a/.github/workflows/license_tests.yml +++ b/.github/workflows/license_tests.yml @@ -37,7 +37,7 @@ jobs: requirements: 'requirements-all.txt' fail: 'Copyleft,Other,Error' fails-only: true - exclude: '^(precise-runner|fann2|ovos-adapt-parser|ovos-padatious|tqdm|bs4|sonopy|caldav|recurring-ical-events|x-wr-timezone|zeroconf|mutagen).*' + exclude: '^(precise-runner|fann2|mycroft-legacy|ovos-adapt-parser|ovos-padatious|tqdm|bs4|sonopy|caldav|recurring-ical-events|x-wr-timezone|zeroconf|mutagen).*' exclude-license: '^(Mozilla).*$' - name: Print report if: ${{ always() }} diff --git a/.github/workflows/mycroft_tests.yml b/.github/workflows/mycroft_tests.yml deleted file mode 100644 index 8bdb4a9434c9..000000000000 --- a/.github/workflows/mycroft_tests.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Run Mycroft Tests -on: - pull_request: - branches: - - dev - paths-ignore: - - 'ovos_core/version.py' - - 'examples/**' - - '.github/**' - - '.gitignore' - - 'LICENSE' - - 'CHANGELOG.md' - - 'MANIFEST.in' - - 'readme.md' - - 'scripts/**' - workflow_dispatch: - -jobs: - mycroft_tests: - strategy: - max-parallel: 3 - matrix: - python-version: [3.9] - runs-on: ubuntu-latest - timeout-minutes: 35 - steps: - - uses: actions/checkout@v2 - - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - name: Install System Dependencies - run: | - sudo apt-get update - sudo apt install python3-dev swig libssl-dev portaudio19-dev libpulse-dev - python -m pip install build wheel - - name: Install test dependencies - run: | - pip install -r requirements/tests.txt - - name: Install core repo - run: | - pip install -e .[mycroft,plugins,deprecated] - - name: Run mycroft compat tests - run: | - pytest test/backwards_compat \ No newline at end of file diff --git a/mycroft/__init__.py b/mycroft/__init__.py deleted file mode 100644 index bcbc47550331..000000000000 --- a/mycroft/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from os.path import abspath, dirname, join -from ovos_config.config import Configuration -from ovos_bus_client.message import Message - -from ovos_workshop.intents import IntentBuilder, Intent -from ovos_workshop.decorators import intent_handler, intent_file_handler, adds_context, removes_context -from ovos_workshop.skills.ovos import OVOSSkill as MycroftSkill -from ovos_workshop.skills.fallback import FallbackSkill -from ovos_utils.log import LOG - - -MYCROFT_ROOT_PATH = abspath(join(dirname(__file__), '..')) - -__all__ = ['MYCROFT_ROOT_PATH'] - -_cfg = Configuration() -_log_level = _cfg.get("log_level", "INFO") -_logs_conf = _cfg.get("logs") or {} -_logs_conf["level"] = _log_level -LOG.init(_logs_conf) # read log level from config - - -LOG.warning("mycroft has been deprecated! please start importing from ovos_core and companion packages\n" - "mycroft module remains available for backwards compatibility and will be removed in version 0.2.0") \ No newline at end of file diff --git a/mycroft/api/__init__.py b/mycroft/api/__init__.py deleted file mode 100644 index 1ad507b9f3e0..000000000000 --- a/mycroft/api/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# This submodule has been deprecated, please import from ovos_backend_client directly -from mycroft.deprecated.api import Api, UUID, GeolocationApi, STTApi, DeviceApi -from ovos_backend_client.pairing import has_been_paired, is_paired, check_remote_pairing, \ - is_backend_disabled, requires_backend -from ovos_backend_client.exceptions import BackendDown, InternetDown diff --git a/mycroft/audio/__init__.py b/mycroft/audio/__init__.py deleted file mode 100644 index 5d4f024919a0..000000000000 --- a/mycroft/audio/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from ovos_audio.utils import wait_while_speaking, is_speaking, stop_speaking diff --git a/mycroft/audio/__main__.py b/mycroft/audio/__main__.py deleted file mode 100644 index c637d8b02b2a..000000000000 --- a/mycroft/audio/__main__.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# backwards compat imports -from ovos_audio.service import PlaybackService, on_ready, on_error, on_stopping -from ovos_config.locale import setup_locale -from ovos_utils import wait_for_exit_signal -from ovos_utils.process_utils import reset_sigint_handler, PIDLock -from ovos_utils.signal import check_for_signal -from ovos_utils.log import init_service_logger - -service = None # Added for backwards-compat. - - -def main(ready_hook=on_ready, error_hook=on_error, stopping_hook=on_stopping, - watchdog=lambda: None): - global service - """Start the Audio Service and connect to the Message Bus""" - init_service_logger("audio") - reset_sigint_handler() - check_for_signal("isSpeaking") - PIDLock("audio") - setup_locale() - service = PlaybackService(ready_hook=ready_hook, error_hook=error_hook, - stopping_hook=stopping_hook, watchdog=watchdog) - service.daemon = True - service.start() - wait_for_exit_signal() - service.shutdown() - - -if __name__ == '__main__': - main() diff --git a/mycroft/audio/audioservice.py b/mycroft/audio/audioservice.py deleted file mode 100644 index 4ac9e5272661..000000000000 --- a/mycroft/audio/audioservice.py +++ /dev/null @@ -1,10 +0,0 @@ -# backwards compat imports -from ovos_audio.audio import AudioService -from ovos_plugin_manager.audio import setup_audio_service as setup_service, load_audio_service_plugins as load_plugins -from ovos_plugin_manager.templates.audio import RemoteAudioBackend - -# deprecated, but can not be deleted for backwards compat imports -from mycroft.deprecated.audio import load_internal_services, load_services, create_service_spec, get_services - -MINUTES = 60 # Seconds in a minute - diff --git a/mycroft/audio/interface.py b/mycroft/audio/interface.py deleted file mode 100644 index fcb019432c85..000000000000 --- a/mycroft/audio/interface.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat imports -# TODO - import the OCP compat audio service instead of classic -from ovos_bus_client.apis.ocp import ClassicAudioServiceInterface as AudioService, ensure_uri diff --git a/mycroft/audio/service.py b/mycroft/audio/service.py deleted file mode 100644 index f432a8f780cc..000000000000 --- a/mycroft/audio/service.py +++ /dev/null @@ -1,5 +0,0 @@ -# backwards compat imports -from ovos_audio.tts import TTSFactory -from ovos_plugin_manager.templates.tts import TTS -from ovos_audio.audio import AudioService -from ovos_audio.service import PlaybackService, on_ready, on_alive, on_started, on_error, on_stopping \ No newline at end of file diff --git a/mycroft/audio/services/__init__.py b/mycroft/audio/services/__init__.py deleted file mode 100644 index 6ef616fcdeef..000000000000 --- a/mycroft/audio/services/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -""" -This module contains dead code only -All code here is in life support and available only for backwards api compatibility -Bug fixes will be made to maintain compatibility but are very low priority! -""" -from mycroft.deprecated.audio.services import AudioBackend, RemoteAudioBackend diff --git a/mycroft/audio/services/simple/__init__.py b/mycroft/audio/services/simple/__init__.py deleted file mode 100644 index eb8461700eba..000000000000 --- a/mycroft/audio/services/simple/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -""" -This module contains dead code only -All code here is in life support and available only for backwards api compatibility -Bug fixes will be made to maintain compatibility but are very low priority! - -use ovos simple audio plugin instead -""" -from mycroft.deprecated.audio.services.simple import SimpleAudioService diff --git a/mycroft/audio/services/vlc/__init__.py b/mycroft/audio/services/vlc/__init__.py deleted file mode 100644 index 953fc735eb69..000000000000 --- a/mycroft/audio/services/vlc/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -""" -This module contains dead code only -All code here is in life support and available only for backwards api compatibility -Bug fixes will be made to maintain compatibility but are very low priority! - -Use ovos vlc plugin instead -""" -from mycroft.deprecated.audio.services.vlc_player import VlcService, load_service - diff --git a/mycroft/audio/speech.py b/mycroft/audio/speech.py deleted file mode 100644 index 5b2837e96ee1..000000000000 --- a/mycroft/audio/speech.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from mycroft.deprecated.audio.speech import handle_stop, handle_speak, shutdown,\ - mute_and_speak, mimic_fallback_obj, mimic_fallback_tts, tts_hash, init, bus, config, tts, lock -from ovos_utils.log import LOG - -LOG.warning("This module is deprecated") - - - diff --git a/mycroft/audio/tts.py b/mycroft/audio/tts.py deleted file mode 100644 index 9c9cd97c5967..000000000000 --- a/mycroft/audio/tts.py +++ /dev/null @@ -1,5 +0,0 @@ -# backwards compat imports -from ovos_audio.tts import TTSFactory -from ovos_plugin_manager.tts import load_tts_plugin -from ovos_plugin_manager.templates.tts import TTS, RemoteTTS, \ - RemoteTTSException, RemoteTTSTimeoutException \ No newline at end of file diff --git a/mycroft/audio/utils.py b/mycroft/audio/utils.py deleted file mode 100644 index cc762e76ade0..000000000000 --- a/mycroft/audio/utils.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat imports -from ovos_audio.utils import is_speaking, wait_while_speaking, stop_speaking \ No newline at end of file diff --git a/mycroft/client/__init__.py b/mycroft/client/__init__.py deleted file mode 100644 index 78b6867278cb..000000000000 --- a/mycroft/client/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -This module contains back compat imports only -All code here is in life support and available only for backwards api compatibility -Bug fixes will be made to maintain compatibility but are very low priority! -""" \ No newline at end of file diff --git a/mycroft/client/enclosure/__init__.py b/mycroft/client/enclosure/__init__.py deleted file mode 100644 index d0a3616f03bf..000000000000 --- a/mycroft/client/enclosure/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -""" -from mycroft.deprecated.enclosure import * diff --git a/mycroft/client/enclosure/__main__.py b/mycroft/client/enclosure/__main__.py deleted file mode 100644 index 0468f47cb5ac..000000000000 --- a/mycroft/client/enclosure/__main__.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -""" -from ovos_utils.log import init_service_logger -from mycroft.deprecated.enclosure.main import * - -if __name__ == "__main__": - init_service_logger("enclosure") - main() diff --git a/mycroft/client/enclosure/base.py b/mycroft/client/enclosure/base.py deleted file mode 100644 index a0410893f1e9..000000000000 --- a/mycroft/client/enclosure/base.py +++ /dev/null @@ -1,12 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -""" - -from mycroft.deprecated.enclosure.base import Enclosure diff --git a/mycroft/client/enclosure/generic/__init__.py b/mycroft/client/enclosure/generic/__init__.py deleted file mode 100644 index 087ca65a2c2d..000000000000 --- a/mycroft/client/enclosure/generic/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from mycroft.deprecated.enclosure.generic import EnclosureGeneric \ No newline at end of file diff --git a/mycroft/client/enclosure/mark1/__init__.py b/mycroft/client/enclosure/mark1/__init__.py deleted file mode 100644 index 6f08c455bba7..000000000000 --- a/mycroft/client/enclosure/mark1/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from mycroft.deprecated.enclosure.mark1 import EnclosureEyes, EnclosureArduino, EnclosureMouth, Enclosure, EnclosureReader, EnclosureWriter, EnclosureMark1 diff --git a/mycroft/client/enclosure/mark1/arduino.py b/mycroft/client/enclosure/mark1/arduino.py deleted file mode 100644 index e3a7cb6be74c..000000000000 --- a/mycroft/client/enclosure/mark1/arduino.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from mycroft.deprecated.enclosure.mark1.arduino import EnclosureArduino diff --git a/mycroft/client/enclosure/mark1/eyes.py b/mycroft/client/enclosure/mark1/eyes.py deleted file mode 100644 index 3e2dc159b045..000000000000 --- a/mycroft/client/enclosure/mark1/eyes.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from mycroft.deprecated.enclosure.mark1.eyes import EnclosureEyes diff --git a/mycroft/client/enclosure/mark1/mouth.py b/mycroft/client/enclosure/mark1/mouth.py deleted file mode 100644 index 1354adf4b1d4..000000000000 --- a/mycroft/client/enclosure/mark1/mouth.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from mycroft.deprecated.enclosure.mark1.mouth import EnclosureMouth diff --git a/mycroft/client/enclosure/mark2/__init__.py b/mycroft/client/enclosure/mark2/__init__.py deleted file mode 100644 index 4499a34cbdb2..000000000000 --- a/mycroft/client/enclosure/mark2/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from mycroft.deprecated.enclosure.mark2 import EnclosureMark2 diff --git a/mycroft/client/speech/__init__.py b/mycroft/client/speech/__init__.py deleted file mode 100644 index e3d4b5465735..000000000000 --- a/mycroft/client/speech/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -""" -This module contains back compat imports only -Speech client moved into mycroft.listener module -""" diff --git a/mycroft/client/speech/__main__.py b/mycroft/client/speech/__main__.py deleted file mode 100644 index 4e54a46bcfde..000000000000 --- a/mycroft/client/speech/__main__.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -This module contains back compat imports only -Speech client moved into mycroft.listener module -""" - -from ovos_listener.service import SpeechService, on_error, on_stopping, on_ready -from ovos_config.locale import setup_locale -from ovos_utils import wait_for_exit_signal -from ovos_utils.process_utils import reset_sigint_handler, PIDLock -from ovos_utils.log import init_service_logger - -# backwards compat - unused but remain available for import just in case -from ovos_listener.service import RecognizerLoop - - -def main(ready_hook=on_ready, error_hook=on_error, stopping_hook=on_stopping, - watchdog=lambda: None): - init_service_logger("voice") - reset_sigint_handler() - PIDLock("voice") - setup_locale() - service = SpeechService(on_ready=ready_hook, - on_error=error_hook, - on_stopping=stopping_hook, - watchdog=watchdog) - service.daemon = True - service.start() - wait_for_exit_signal() - - -if __name__ == "__main__": - main() diff --git a/mycroft/client/speech/data_structures.py b/mycroft/client/speech/data_structures.py deleted file mode 100644 index e4ca068f0af9..000000000000 --- a/mycroft/client/speech/data_structures.py +++ /dev/null @@ -1,6 +0,0 @@ -""" -This module contains back compat imports only -Speech client moved into mycroft.listener module -""" -from ovos_listener.data_structures import CyclicAudioBuffer -from mycroft.deprecated.speech_client import RollingMean diff --git a/mycroft/client/speech/hotword_factory.py b/mycroft/client/speech/hotword_factory.py deleted file mode 100644 index a115132dba54..000000000000 --- a/mycroft/client/speech/hotword_factory.py +++ /dev/null @@ -1,7 +0,0 @@ -""" -This module contains back compat imports only -Speech client moved into mycroft.listener module -""" -from ovos_listener.hotword_factory import HotWordFactory -from ovos_plugin_manager.templates.hotwords import HotWordEngine - diff --git a/mycroft/client/speech/listener.py b/mycroft/client/speech/listener.py deleted file mode 100644 index 76fb2396b38b..000000000000 --- a/mycroft/client/speech/listener.py +++ /dev/null @@ -1,10 +0,0 @@ -""" -This module contains back compat imports only -Speech client moved into mycroft.listener module -""" -from ovos_listener.stt import STTFactory -from ovos_listener.hotword_factory import HotWordFactory -from ovos_listener.listener import AudioConsumer, AudioProducer, AudioStreamHandler, \ - AUDIO_DATA, STREAM_DATA, STREAM_STOP, STREAM_START, MAX_MIC_RESTARTS, \ - RecognizerLoop, RecognizerLoopState, recognizer_conf_hash -from ovos_listener.utils import find_input_device diff --git a/mycroft/client/speech/mic.py b/mycroft/client/speech/mic.py deleted file mode 100644 index 72be8d9737de..000000000000 --- a/mycroft/client/speech/mic.py +++ /dev/null @@ -1,7 +0,0 @@ -""" -This module contains back compat imports only -Speech client moved into mycroft.listener module -""" -from ovos_listener.mic import WakeWordData, MutableStream, MutableMicrophone, get_silence, ResponsiveRecognizer -from mycroft.deprecated.speech_client import NoiseTracker - diff --git a/mycroft/client/speech/service.py b/mycroft/client/speech/service.py deleted file mode 100644 index e8bdf2d72688..000000000000 --- a/mycroft/client/speech/service.py +++ /dev/null @@ -1,6 +0,0 @@ -""" -This module contains back compat imports only -Speech client moved into mycroft.listener module -""" -# backwards compat (with ovos, not mycroft) -from ovos_listener.service import ListenerState, SpeechService, SpeechClient, ListeningMode, RecognizerLoop diff --git a/mycroft/client/speech/silence.py b/mycroft/client/speech/silence.py deleted file mode 100644 index efcb8e9cd824..000000000000 --- a/mycroft/client/speech/silence.py +++ /dev/null @@ -1,6 +0,0 @@ -""" -This module contains back compat imports only -Speech client moved into mycroft.listener module -""" -# backwards compat (with ovos, not mycroft) -from ovos_listener.silence import SilenceMethod, SilenceResult, SilenceDetector, SilenceResultType diff --git a/mycroft/client/speech/word_extractor.py b/mycroft/client/speech/word_extractor.py deleted file mode 100644 index ea0d05f6c31e..000000000000 --- a/mycroft/client/speech/word_extractor.py +++ /dev/null @@ -1,6 +0,0 @@ -""" -This module contains dead code only -All code here is in life support and available only for backwards api compatibility -Bug fixes will be made to maintain compatibility but are very low priority! -""" -from mycroft.deprecated.speech_client import WordExtractor \ No newline at end of file diff --git a/mycroft/client/text/__init__.py b/mycroft/client/text/__init__.py deleted file mode 100644 index 7c10443df096..000000000000 --- a/mycroft/client/text/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -This module contains back compat imports only -Text client moved into ovos_cli_client package -""" -from mycroft.deprecated.text import * diff --git a/mycroft/client/text/__main__.py b/mycroft/client/text/__main__.py deleted file mode 100644 index 3fa98b6de2d8..000000000000 --- a/mycroft/client/text/__main__.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -This module contains back compat imports only -Text client moved into ovos_cli_client package -""" -from ovos_cli_client.__main__ import main -from ovos_utils.log import init_service_logger - - -if __name__ == "__main__": - init_service_logger("cli") - main() diff --git a/mycroft/client/text/gui_server.py b/mycroft/client/text/gui_server.py deleted file mode 100644 index a5f4843fb26c..000000000000 --- a/mycroft/client/text/gui_server.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -This module contains back compat imports only -Text client moved into ovos_cli_client package -""" -from mycroft.deprecated.text.gui_server import * diff --git a/mycroft/client/text/text_client.py b/mycroft/client/text/text_client.py deleted file mode 100644 index 6a0369eb78ad..000000000000 --- a/mycroft/client/text/text_client.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -This module contains back compat imports only -Text client moved into ovos_cli_client package -""" -from mycroft.deprecated.text.text_client import * diff --git a/mycroft/configuration/__init__.py b/mycroft/configuration/__init__.py deleted file mode 100644 index 845330ca934f..000000000000 --- a/mycroft/configuration/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# backwards compat - moved to own python package -from mycroft.configuration.config import Configuration -from ovos_config.config import LocalConf, RemoteConf -from ovos_config.locale import set_default_lf_lang, setup_locale, \ - set_default_tz, set_default_lang, get_default_tz, get_default_lang, \ - get_config_tz, get_primary_lang_code, load_languages, load_language -from ovos_config.locations import SYSTEM_CONFIG, USER_CONFIG, DEFAULT_CONFIG, \ - get_xdg_config_locations -from ovos_config.meta import get_ovos_config diff --git a/mycroft/configuration/config.py b/mycroft/configuration/config.py deleted file mode 100644 index 5d5d6e3793af..000000000000 --- a/mycroft/configuration/config.py +++ /dev/null @@ -1,26 +0,0 @@ -# backwards compat - moved to own python package -from ovos_config.config import Configuration as _Config -from ovos_config.config import MycroftUserConfig, MycroftDefaultConfig, MycroftSystemConfig, RemoteConf, LocalConf -from ovos_config.locations import OLD_USER_CONFIG, DEFAULT_CONFIG, SYSTEM_CONFIG, REMOTE_CONFIG, USER_CONFIG, WEB_CONFIG_CACHE -from ovos_utils.log import log_deprecation - - -class Configuration(_Config): - @classmethod - def get(cls, *args, **kwargs): - """ - Backwards-compat `get` method from - https://github.com/MycroftAI/mycroft-core/blob/dev/mycroft/configuration/config.py - """ - configs = args[0] if len(args) > 0 else kwargs.get("configs", None) - if configs or isinstance(configs, list): - log_deprecation("`Configuration.get` now implements `dict.get`", - "0.1.0") - return Configuration.fake_get(*args, **kwargs) - - @staticmethod - def fake_get(configs=None, cache=True, remote=True): - """DEPRECATED - use Configuration class instead""" - # NOTE: this is only called if using the class directly - # if using an instance (dict object) self._real_get is called instead - return Configuration.load_config_stack(configs, cache, remote) \ No newline at end of file diff --git a/mycroft/configuration/locale.py b/mycroft/configuration/locale.py deleted file mode 100644 index f6bc6556b29c..000000000000 --- a/mycroft/configuration/locale.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat - moved to own python package -from ovos_config.locale import setup_locale, set_default_tz, set_default_lang, set_default_lf_lang, load_language, load_languages, get_default_lang, get_default_tz, get_config_tz, get_primary_lang_code diff --git a/mycroft/configuration/locations.py b/mycroft/configuration/locations.py deleted file mode 100644 index 53bc36c40147..000000000000 --- a/mycroft/configuration/locations.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat - moved to own python package -from ovos_config.locations import DEFAULT_CONFIG, OLD_USER_CONFIG, SYSTEM_CONFIG, REMOTE_CONFIG, USER_CONFIG, WEB_CONFIG_CACHE diff --git a/mycroft/configuration/ovos.py b/mycroft/configuration/ovos.py deleted file mode 100644 index 49e070d87822..000000000000 --- a/mycroft/configuration/ovos.py +++ /dev/null @@ -1,69 +0,0 @@ -"""This file will check a system level OpenVoiceOS specific config file - -The ovos config is json with comment support like the regular mycroft.conf - -Default locations tried by order until a file is found -- /etc/OpenVoiceOS/ovos.conf -- /etc/mycroft/ovos.conf - -XDG locations are then merged over the select default config (if found) - -Examples config: - -{ - // check xdg directories OR only check old style hardcoded paths - "xdg": true, - - // the "name of the core", - // eg, OVOS, Neon, Chatterbox... - // all XDG paths should respect this - // {xdg_path}/{base_folder}/some_resource - // "mycroft.conf" paths are derived from this - // ~/.{base_folder}/mycroft.conf - "base_folder": "OpenVoiceOS", - - // the filename of "mycroft.conf", - // eg, ovos.conf, chatterbox.conf, neon.conf... - // "mycroft.conf" paths are derived from this - // ~/.{base_folder}/{config_filename} - // supported file extensions: - // - json (.json) - // - commented json (.conf) - // - yaml (.yaml/.yml) are supported - "config_filename": "mycroft.conf", - - // override the default.conf location, allows changing the default values - // eg, disable backend, disable skills, configure permissions - "default_config_path": "/etc/OpenVoiceOS/default_mycroft.conf", - - // this is intended for derivative products, if a module name is present - // in sys.modules then the values below will be used instead - // eg, chatterbox/mycroft/ovos/neon can coexist in the same machine - "module_overrides": { - "chatterbox": { - "xdg": false, - "base_folder": "chatterbox", - "config_filename": "chatterbox.conf", - "default_config_path": "/opt/chatterbox/chatterbox.conf" - }, - "neon_core": { - "xdg": true, - "base_folder": "neon", - "config_filename": "neon.conf", - "default_config_path": "/opt/neon/neon.conf" - } - }, - // essentially aliases for the above, useful for microservice architectures - "submodule_mappings": { - "chatterbox_stt": "chatterbox", - "chatterbox_playback": "chatterbox", - "chatterbox_admin": "chatterbox", - "chatterbox_blockly": "chatterbox", - "chatterbox_gpio_service": "chatterbox", - "neon_speech": "neon_core", - "neon_audio": "neon_core", - "neon_enclosure": "neon_core" - } -} -""" -from ovos_config.meta import get_ovos_config diff --git a/mycroft/deprecated/__init__.py b/mycroft/deprecated/__init__.py deleted file mode 100644 index 7c5e6d853f11..000000000000 --- a/mycroft/deprecated/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -This module contains dead code only -All code here is in life support and available only for backwards api compatibility -Bug fixes will be made to maintain compatibility but are very low priority! -""" \ No newline at end of file diff --git a/mycroft/deprecated/api.py b/mycroft/deprecated/api.py deleted file mode 100644 index 93cef6d23ec2..000000000000 --- a/mycroft/deprecated/api.py +++ /dev/null @@ -1,324 +0,0 @@ -from copy import copy - -import requests -from requests.exceptions import HTTPError -from mycroft.version import VersionManager, OVOS_VERSION_STR -from ovos_backend_client.api import STTApi as _STTApi, GeolocationApi as _GeoApi, BaseApi, DeviceApi as _DeviceApi -from ovos_config.config import Configuration -from ovos_utils.log import LOG -from ovos_backend_client.pairing import has_been_paired, is_paired, check_remote_pairing, \ - is_backend_disabled, requires_backend - - -UUID = '{MYCROFT_UUID}' - - -class Api(BaseApi): - """ Generic class to wrap web APIs - backwards compat only, please use ovos_backend_client package directly""" - - params_to_etag = {} - etag_to_response = {} - - def __init__(self, path): - self.path = path - config = Configuration() - config_server = config.get("server") or {} - url = config_server.get("url") - version = config_server.get("version") - super().__init__(url, version) - self.disabled = is_backend_disabled() - - @property - def version(self): - return self.backend_version - - def request(self, params): - self.check_token() - if 'path' in params: - params['path'] = params['path'].replace(UUID, self.identity.uuid) - self.build_path(params) - self.old_params = copy(params) - return self.send(params) or {} - - def get_data(self, response): - try: - return response.json() - except Exception: - return response.text - - def build_headers(self, params): - headers = params.get("headers", {}) - self.add_content_type(headers) - self.add_authorization(headers) - params["headers"] = headers - return headers - - def add_content_type(self, headers): - if not headers.__contains__("Content-Type"): - headers["Content-Type"] = "application/json" - - def add_authorization(self, headers): - if not headers.__contains__("Authorization"): - headers["Authorization"] = "Bearer " + self.identity.access - - def build_data(self, params): - return params.get("data") - - def build_json(self, params): - json = params.get("json") - if json and params["headers"]["Content-Type"] == "application/json": - for k, v in json.items(): - if v == "": - json[k] = None - params["json"] = json - return json - - def build_query(self, params): - return params.get("query") - - def build_path(self, params): - path = params.get("path", "") - params["path"] = self.path + path - return params["path"] - - def build_url(self, params): - path = params.get("path", "") - version = params.get("version", self.version) - return self.url + "/" + version + "/" + path - - def send(self, params, no_refresh=False): - """ Send request to mycroft backend. - The method handles Etags and will return a cached response value - if nothing has changed on the remote. - - Args: - params (dict): request parameters - no_refresh (bool): optional parameter to disable refreshs of token - - Returns: - Requests response object. - """ - if self.disabled: - return {} - query_data = frozenset(params.get('query', {}).items()) - params_key = (params.get('path'), query_data) - etag = self.params_to_etag.get(params_key) - - method = params.get("method", "GET") - headers = self.build_headers(params) - data = self.build_data(params) - json_body = self.build_json(params) - query = self.build_query(params) - url = self.build_url(params) - - # For an introduction to the Etag feature check out: - # https://en.wikipedia.org/wiki/HTTP_ETag - if etag: - headers['If-None-Match'] = etag - - response = requests.request( - method, url, headers=headers, params=query, - data=data, json=json_body, timeout=(3.05, 15) - ) - if response.status_code == 304: - # Etag matched, use response previously cached - response = self.etag_to_response[etag] - elif 'ETag' in response.headers: - etag = response.headers['ETag'].strip('"') - # Cache response for future lookup when we receive a 304 - self.params_to_etag[params_key] = etag - self.etag_to_response[etag] = response - - return self.get_response(response, no_refresh) - - def get_response(self, response, no_refresh=False): - """ Parse response and extract data from response. - - Will try to refresh the access token if it's expired. - - Args: - response (requests Response object): Response to parse - no_refresh (bool): Disable refreshing of the token - - Returns: - data fetched from server - """ - if self.disabled: - return {} - data = self.get_data(response) - - if 200 <= response.status_code < 300: - return data - elif all([not no_refresh, - response.status_code == 401, - not response.url.endswith("auth/token"), - self.identity.is_expired()]): - self.refresh_token() - return self.send(self.old_params, no_refresh=True) - raise HTTPError(data, response=response) - - -class GeolocationApi(Api): - """Web API wrapper for performing geolocation lookups.""" - - def __init__(self): - LOG.warning("mycroft.api module has been deprecated, please use ovos_backend_client directly") - LOG.warning("use 'from ovos_backend_client.api import GeolocationApi' instead") - super().__init__('geolocation') - - @property - def _real_api(self): - """ this is a property to reflect live updates to backend url """ - return _GeoApi() - - def get_geolocation(self, location): - """Call the geolocation endpoint. - - Args: - location (str): the location to lookup (e.g. Kansas City Missouri) - - Returns: - str: JSON structure with lookup results - """ - return self._real_api.get_geolocation(location) - - -class STTApi(Api): - """ Web API wrapper for performing Speech to Text (STT) """ - - def __init__(self, path): - LOG.warning("mycroft.api module has been deprecated, please use ovos_backend_client directly") - LOG.warning("use 'from ovos_backend_client.api import STTApi' instead") - super(STTApi, self).__init__(path) - - @property - def _real_api(self): - """ this is a property to reflect live updates to backend url """ - return _STTApi() - - def stt(self, audio, language, limit): - """ Web API wrapper for performing Speech to Text (STT) - - Args: - audio (bytes): The recorded audio, as in a FLAC file - language (str): A BCP-47 language code, e.g. "en-US" - limit (int): Maximum minutes to transcribe(?) - - Returns: - str: JSON structure with transcription results - """ - - return self._real_api.stt(audio, language, limit) - - -class DeviceApi(Api): - """ Web API wrapper for obtaining device-level information - selene_api is not used directly to account for disabled_backend setting""" - - def __init__(self): - LOG.warning("mycroft.api module has been deprecated, please use ovos_backend_client directly") - LOG.warning("use 'from ovos_backend_client.api import DeviceApi' instead") - super(DeviceApi, self).__init__("device") - - @property - def _real_api(self): - """ this is a property to reflect live updates to backend url """ - return _DeviceApi() - - def get_code(self, state): - return self._real_api.get_code(state) - - def activate(self, state, token): - version = VersionManager.get() - platform = "ovos-core" - platform_build = OVOS_VERSION_STR - return self._real_api.activate(state, token, version.get("coreVersion"), - platform, platform_build, version.get("enclosureVersion")) - - def update_version(self): - version = VersionManager.get() - platform = "ovos-core" - platform_build = OVOS_VERSION_STR - return self._real_api.update_version(version.get("coreVersion"), - platform, platform_build, - version.get("enclosureVersion")) - - def send_email(self, title, body, sender): - return self._real_api.send_email(title, body, sender) - - def report_metric(self, name, data): - return self._real_api.report_metric(name, data) - - def get(self): - """ Retrieve all device information from the web backend """ - return self._real_api.get() - - def get_settings(self): - """ Retrieve device settings information from the web backend - - Returns: - str: JSON string with user configuration information. - """ - return self._real_api.get_settings() - - def get_location(self): - """ Retrieve device location information from the web backend - - Returns: - str: JSON string with user location. - """ - return self._real_api.get_location() - - def get_subscription(self): - """ - Get information about type of subscrition this unit is connected - to. - - Returns: dictionary with subscription information - """ - return self._real_api.get_subscription() - - @property - def is_subscriber(self): - """ - status of subscription. True if device is connected to a paying - subscriber. - """ - return self._real_api.is_subscriber - - def get_subscriber_voice_url(self, voice=None): - return self._real_api.get_subscriber_voice_url(voice) - - def get_oauth_token(self, dev_cred): - """ - Get Oauth token for dev_credential dev_cred. - - Argument: - dev_cred: development credentials identifier - - Returns: - json string containing token and additional information - """ - return self._real_api.get_oauth_token(dev_cred) - - def get_skill_settings(self): - """Get the remote skill settings for all skills on this device.""" - return self._real_api.get_skill_settings() - - def upload_skill_metadata(self, settings_meta): - """Upload skill metadata. - - Args: - settings_meta (dict): skill info and settings in JSON format - """ - return self._real_api.upload_skill_metadata(settings_meta) - - def upload_skills_data(self, data): - """ Upload skills.json file. This file contains a manifest of installed - and failed installations for use with the Marketplace. - - Args: - data: dictionary with skills data from msm - """ - return self._real_api.upload_skills_data(data) diff --git a/mycroft/deprecated/audio/__init__.py b/mycroft/deprecated/audio/__init__.py deleted file mode 100644 index ada114383534..000000000000 --- a/mycroft/deprecated/audio/__init__.py +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import importlib -import sys -from os import listdir -from os.path import abspath, dirname, basename, isdir, join -from ovos_utils.log import LOG -from ovos_plugin_manager.audio import setup_audio_service as setup_service, load_audio_service_plugins as load_plugins - -MAINMODULE = '__init__' - - -def create_service_spec(service_folder): - """Prepares a descriptor that can be used together with imp. - - Args: - service_folder: folder that shall be imported. - - Returns: - Dict with import information - """ - module_name = 'audioservice_' + basename(service_folder) - path = join(service_folder, MAINMODULE + '.py') - spec = importlib.util.spec_from_file_location(module_name, path) - mod = importlib.util.module_from_spec(spec) - info = {'spec': spec, 'mod': mod, 'module_name': module_name} - return {"name": basename(service_folder), "info": info} - - -def get_services(services_folder): - """ - Load and initialize services from all subfolders. - - Args: - services_folder: base folder to look for services in. - - Returns: - Sorted list of audio services. - """ - LOG.info("Loading services from " + services_folder) - services = [] - possible_services = listdir(services_folder) - for i in possible_services: - location = join(services_folder, i) - if (isdir(location) and - not MAINMODULE + ".py" in listdir(location)): - for j in listdir(location): - name = join(location, j) - if (not isdir(name) or - not MAINMODULE + ".py" in listdir(name)): - continue - try: - services.append(create_service_spec(name)) - except Exception: - LOG.error('Failed to create service from ' + name, - exc_info=True) - if (not isdir(location) or - not MAINMODULE + ".py" in listdir(location)): - continue - try: - services.append(create_service_spec(location)) - except Exception: - LOG.error('Failed to create service from ' + location, - exc_info=True) - return sorted(services, key=lambda p: p.get('name')) - - -def load_internal_services(config, bus, path=None): - """Load audio services included in Mycroft-core. - - Args: - config: configuration dict for the audio backends. - bus: Mycroft messagebus - path: (default None) optional path for builtin audio service - implementations - - Returns: - List of started services - """ - if path is None: - path = dirname(abspath(__file__)) + '/services/' - service_directories = get_services(path) - service = [] - for descriptor in service_directories: - try: - service_module = descriptor['info']['mod'] - spec = descriptor['info']['spec'] - module_name = descriptor['info']['module_name'] - sys.modules[module_name] = service_module - spec.loader.exec_module(service_module) - except Exception as e: - LOG.error('Failed to import module ' + descriptor['name'] + '\n' + - repr(e)) - else: - s = setup_service(service_module, config, bus) - if s: - LOG.info('Loaded ' + descriptor['name']) - service += s - - return service - - -def load_services(config, bus, path=None): - """Load builtin services as well as service plugins - - The builtin service folder is scanned (or a folder indicated by the path - parameter) for services and plugins registered with the - "mycroft.plugin.audioservice" entrypoint group. - - Args: - config: configuration dict for the audio backends. - bus: Mycroft messagebus - path: (default None) optional path for builtin audio service - implementations - - Returns: - List of started services. - """ - return (load_internal_services(config, bus, path) + - load_plugins(config, bus)) diff --git a/mycroft/deprecated/audio/services/__init__.py b/mycroft/deprecated/audio/services/__init__.py deleted file mode 100644 index e279cb961a1a..000000000000 --- a/mycroft/deprecated/audio/services/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from ovos_plugin_manager.templates.audio import AudioBackend, RemoteAudioBackend diff --git a/mycroft/deprecated/audio/services/simple/__init__.py b/mycroft/deprecated/audio/services/simple/__init__.py deleted file mode 100644 index c45e1bba3f9b..000000000000 --- a/mycroft/deprecated/audio/services/simple/__init__.py +++ /dev/null @@ -1,250 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import signal -from threading import Lock -from time import sleep - -from ovos_plugin_manager.templates.audio import AudioBackend -from ovos_bus_client.message import Message -from ovos_utils.log import LOG -from ovos_utils.sound import play_audio -import mimetypes -import re -from requests import Session - - -def find_mime(path): - mime = None - if path.startswith('http'): - response = Session().head(path, allow_redirects=True) - if 200 <= response.status_code < 300: - mime = response.headers['content-type'] - if not mime: - mime = mimetypes.guess_type(path)[0] - # Remove any http address arguments - if not mime: - mime = mimetypes.guess_type(re.sub(r'\?.*$', '', path))[0] - - if mime: - return mime.split('/') - else: - return (None, None) - - -class SimpleAudioService(AudioBackend): - """ - Simple Audio backend for both mpg123 and the ogg123 player. - This one is rather limited and only implements basic usage. - """ - - def __init__(self, config, bus, name='simple'): - super().__init__(config, bus) - self.config = config - self.process = None - self.bus = bus - self.name = name - self._stop_signal = False - self._is_playing = False - self._paused = False - self.tracks = [] - self.index = 0 - self.supports_mime_hints = True - mimetypes.init() - self.track_lock = Lock() - - self.bus.on('SimpleAudioServicePlay', self._play) - - def supported_uris(self): - return ['file', 'http'] - - def clear_list(self): - with self.track_lock: - self.tracks = [] - - def add_list(self, tracks): - with self.track_lock: - self.tracks += tracks - LOG.info("Track list is " + str(tracks)) - - def _get_track(self, track_data): - if isinstance(track_data, list): - track = track_data[0] - mime = track_data[1] - mime = mime.split('/') - else: # Assume string - track = track_data - mime = find_mime(track) - return track, mime - - def _play(self, message): - """Implementation specific async method to handle playback. - - This allows mpg123 service to use the next method as well - as basic play/stop. - """ - LOG.info('SimpleAudioService._play') - - # Stop any existing audio playback - self._stop_running_process() - - repeat = message.data.get('repeat', False) - self._is_playing = True - self._paused = False - with self.track_lock: - if len(self.tracks) > self.index: - track, mime = self._get_track(self.tracks[self.index]) - else: - return - - LOG.debug('Mime info: {}'.format(mime)) - - # Indicate to audio service which track is being played - if self._track_start_callback: - self._track_start_callback(track) - - # Replace file:// uri's with normal paths - track = track.replace('file://', '') - try: - self.process = play_audio(track) - except FileNotFoundError as e: - LOG.error('Couldn\'t play audio, {}'.format(repr(e))) - self.process = None - except Exception as e: - LOG.exception(repr(e)) - self.process = None - - # Wait for completion or stop request - while (self._is_process_running() and not self._stop_signal): - sleep(0.25) - - if self._stop_signal: - self._stop_running_process() - self._is_playing = False - self._paused = False - return - else: - self.process = None - - # if there are more tracks available play next - self.index += 1 - with self.track_lock: - if self.index < len(self.tracks) or repeat: - if self.index >= len(self.tracks): - self.index = 0 - self.bus.emit(Message('SimpleAudioServicePlay', - {'repeat': repeat})) - else: - self._track_start_callback(None) - self._is_playing = False - self._paused = False - - def play(self, repeat=False): - LOG.info('Call SimpleAudioServicePlay') - self.index = 0 - self.bus.emit(Message('SimpleAudioServicePlay', {'repeat': repeat})) - - def stop(self): - LOG.info('SimpleAudioServiceStop') - self._stop_signal = True - while self._is_playing: - sleep(0.1) - self._stop_signal = False - - def _pause(self): - """ Pauses playback if possible. - - Returns: (bool) New paused status: - """ - if self.process: - # Suspend the playback process - self.process.send_signal(signal.SIGSTOP) - return True # After pause the service is paused - else: - return False - - def pause(self): - if not self._paused: - self._paused = self._pause() - - def _resume(self): - """ Resumes playback if possible. - - Returns: (bool) New paused status: - """ - if self.process: - # Resume the playback process - self.process.send_signal(signal.SIGCONT) - return False # After resume the service is no longer paused - else: - return True - - def resume(self): - if self._paused: - # Resume the playback process - self._paused = self._resume() - - def next(self): - # Terminate process to continue to next - self._stop_running_process() - - def previous(self): - pass - - def lower_volume(self): - if not self._paused: - self._pause() # poor-man's ducking - - def restore_volume(self): - if not self._paused: - self._resume() # poor-man's unducking - - def _is_process_running(self): - return self.process and self.process.poll() is None - - def _stop_running_process(self): - if self._is_process_running(): - if self._paused: - # The child process must be "unpaused" in order to be stopped - self._resume() - self.process.terminate() - countdown = 10 - while self._is_process_running() and countdown > 0: - sleep(0.1) - countdown -= 1 - - if self._is_process_running(): - # Failed to shutdown when asked nicely. Force the issue. - LOG.debug("Killing currently playing audio...") - self.process.kill() - self.process = None - - # mandatory abstract methods - def get_track_length(self) -> int: - return 0 - - def get_track_position(self) -> int: - return 0 - - def set_track_position(self, milliseconds): - pass - - -def load_service(base_config, bus): - backends = base_config.get('backends', []) - services = [(b, backends[b]) for b in backends - if backends[b]['type'] == 'simple' and - backends[b].get('active', False)] - instances = [SimpleAudioService(s[1], bus, s[0]) for s in services] - return instances diff --git a/mycroft/deprecated/audio/services/vlc_player/__init__.py b/mycroft/deprecated/audio/services/vlc_player/__init__.py deleted file mode 100644 index 42a0be0b093f..000000000000 --- a/mycroft/deprecated/audio/services/vlc_player/__init__.py +++ /dev/null @@ -1,200 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import vlc - -from ovos_plugin_manager.templates.audio import AudioBackend -from ovos_utils.log import LOG - - -class VlcService(AudioBackend): - def __init__(self, config, bus=None, name='vlc'): - super(VlcService, self).__init__(config, bus) - self.instance = vlc.Instance("--no-video") - self.list_player = self.instance.media_list_player_new() - self.player = self.instance.media_player_new() - self.list_player.set_media_player(self.player) - self.track_list = self.instance.media_list_new() - self.list_player.set_media_list(self.track_list) - self.vlc_events = self.player.event_manager() - self.vlc_list_events = self.list_player.event_manager() - self.vlc_events.event_attach(vlc.EventType.MediaPlayerPlaying, - self.track_start, 1) - self.vlc_events.event_attach(vlc.EventType.MediaPlayerTimeChanged, - self.update_playback_time, None) - self.vlc_list_events.event_attach(vlc.EventType.MediaListPlayerPlayed, - self.queue_ended, 0) - self.config = config - self.bus = bus - self.name = name - self.normal_volume = None - self.low_volume = self.config.get('low_volume', 30) - self._playback_time = 0 - self.player.audio_set_volume(100) - - @property - def playback_time(self): - """ in milliseconds """ - return self._playback_time - - def update_playback_time(self, data, other): - self._playback_time = data.u.new_time - - def track_start(self, data, other): - if self._track_start_callback: - self._track_start_callback(self.track_info()['name']) - - def queue_ended(self, data, other): - LOG.debug('Queue ended') - if self._track_start_callback: - self._track_start_callback(None) - - def supported_uris(self): - return ['file', 'http', 'https'] - - def clear_list(self): - # Create a new media list - self.track_list = self.instance.media_list_new() - # Set list as current track list - self.list_player.set_media_list(self.track_list) - - def add_list(self, tracks): - LOG.debug("Track list is " + str(tracks)) - for t in tracks: - if isinstance(t, list): - t = t[0] - self.track_list.add_media(self.instance.media_new(t)) - - def play(self, repeat=False): - """ Play playlist using vlc. """ - LOG.debug('VLCService Play') - if repeat: - self.list_player.set_playback_mode(vlc.PlaybackMode.loop) - else: - self.list_player.set_playback_mode(vlc.PlaybackMode.default) - - self.list_player.play() - - def stop(self): - """ Stop vlc playback. """ - LOG.info('VLCService Stop') - if self.player.is_playing(): - # Restore volume if lowered - self.restore_volume() - self.clear_list() - self.list_player.stop() - return True - else: - return False - - def pause(self): - """ Pause vlc playback. """ - self.player.set_pause(1) - - def resume(self): - """ Resume paused playback. """ - self.player.set_pause(0) - - def next(self): - """ Skip to next track in playlist. """ - self.list_player.next() - - def previous(self): - """ Skip to previous track in playlist. """ - self.list_player.previous() - - def lower_volume(self): - """ Lower volume (will be called when mycroft is listening - or speaking. - """ - # Lower volume if playing, volume isn't already lowered - # and ducking is enabled - if (self.normal_volume is None and self.player.is_playing() and - self.config.get('duck', False)): - self.normal_volume = self.player.audio_get_volume() - self.player.audio_set_volume(self.low_volume) - - def restore_volume(self): - """ Restore volume to previous level. """ - # if vlc has been lowered restore the volume - if self.normal_volume: - self.player.audio_set_volume(self.normal_volume) - self.normal_volume = None - - def track_info(self): - """ Extract info of current track. """ - ret = {} - meta = vlc.Meta - t = self.player.get_media() - ret['album'] = t.get_meta(meta.Album) - ret['artists'] = [t.get_meta(meta.Artist)] - ret['name'] = t.get_meta(meta.Title) - return ret - - def get_track_length(self): - """ - getting the duration of the audio in milliseconds - """ - return self.player.get_length() - - def get_track_position(self): - """ - get current position in milliseconds - """ - return self.player.get_time() - - def set_track_position(self, milliseconds): - """ - go to position in milliseconds - - Args: - milliseconds (int): number of milliseconds of final position - """ - self.player.set_time(int(milliseconds)) - - def seek_forward(self, seconds=1): - """ - skip X seconds - - Args: - seconds (int): number of seconds to seek, if negative rewind - """ - seconds = seconds * 1000 - new_time = self.player.get_time() + seconds - duration = self.player.get_length() - if new_time > duration: - new_time = duration - self.player.set_time(new_time) - - def seek_backward(self, seconds=1): - """ - rewind X seconds - - Args: - seconds (int): number of seconds to seek, if negative rewind - """ - seconds = seconds * 1000 - new_time = self.player.get_time() - seconds - if new_time < 0: - new_time = 0 - self.player.set_time(new_time) - - -def load_service(base_config, bus): - backends = base_config.get('backends', []) - services = [(b, backends[b]) for b in backends - if backends[b]['type'] == 'vlc' and - backends[b].get('active', False)] - instances = [VlcService(s[1], bus, s[0]) for s in services] - return instances diff --git a/mycroft/deprecated/audio/speech.py b/mycroft/deprecated/audio/speech.py deleted file mode 100644 index 68a5ef2ef02f..000000000000 --- a/mycroft/deprecated/audio/speech.py +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -""" -NOTE: this is dead code! do not use! -This file is only present to ensure backwards compatibility -in case someone is importing from here -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from threading import Lock -from ovos_bus_client import MessageBusClient, Message -from ovos_utils.log import LOG - -bus: MessageBusClient = None -tts = None -tts_hash = None -lock = Lock() -config = None -mimic_fallback_obj = None - - -def _get_messagebus(): - global bus - if not bus: - bus = MessageBusClient() - bus.run_in_thread() - return bus - - -def handle_speak(event): - LOG.warning("speech.handle_speak has been deprecated!") - LOG.error("speak message not handled") - - -def mute_and_speak(utterance, ident, listen=False): - LOG.warning("speech.mute_and_speak has been deprecated!") - bus.emit(Message("speak", {"utterance": utterance, - "expect_response": listen}, {"ident": ident})) - - -def mimic_fallback_tts(utterance, ident, listen): - """ - DEPRECATED: use execute_fallback_tts instead - This method is only kept around for backwards api compat - """ - LOG.warning("speech.mimic_fallback_tts is deprecated! " - "use audio.service.service.execute_fallback_tts instead") - mute_and_speak(utterance, ident, listen) - - -def handle_stop(event): - LOG.warning("speech.handle_stop has been deprecated!") - _get_messagebus().emit(Message("mycroft.stop")) - - -def init(_): - LOG.warning("speech.init has been deprecated!") - - -def shutdown(): - """Shutdown the audio service cleanly. - Stop any playing audio and make sure threads are joined correctly. - """ - LOG.warning("speech.shutdown has been deprecated!") diff --git a/mycroft/deprecated/enclosure/__init__.py b/mycroft/deprecated/enclosure/__init__.py deleted file mode 100644 index fde061868c21..000000000000 --- a/mycroft/deprecated/enclosure/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -""" diff --git a/mycroft/deprecated/enclosure/base.py b/mycroft/deprecated/enclosure/base.py deleted file mode 100644 index 40ab28ab923d..000000000000 --- a/mycroft/deprecated/enclosure/base.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -""" - -from ovos_config.config import Configuration -from ovos_bus_client.client import MessageBusClient -from mycroft.util import start_message_bus_client - - -class Enclosure: - def __init__(self): - # Load full config - config = Configuration() - self.lang = config['lang'] - self.config = config.get("enclosure") - self.global_config = config - - # Create Message Bus Client - self.bus = MessageBusClient() - - def run(self): - """Start the Enclosure after it has been constructed.""" - # Allow exceptions to be raised to the Enclosure Service - # if they may cause the Service to fail. - start_message_bus_client("ENCLOSURE", self.bus) - - def stop(self): - """Perform any enclosure shutdown processes.""" - pass diff --git a/mycroft/deprecated/enclosure/generic/__init__.py b/mycroft/deprecated/enclosure/generic/__init__.py deleted file mode 100644 index 214338b3ffc9..000000000000 --- a/mycroft/deprecated/enclosure/generic/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from mycroft.deprecated.enclosure.base import Enclosure as EnclosureGeneric diff --git a/mycroft/deprecated/enclosure/main.py b/mycroft/deprecated/enclosure/main.py deleted file mode 100644 index 313c17dedb09..000000000000 --- a/mycroft/deprecated/enclosure/main.py +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -""" - -from ovos_config.locale import setup_locale -from ovos_config.config import Configuration -from ovos_gui.service import GUIService -from ovos_utils.log import LOG -from ovos_utils import wait_for_exit_signal -from ovos_utils.process_utils import reset_sigint_handler - - -def on_ready(): - LOG.info("Enclosure started!") - - -def on_stopping(): - LOG.info('Enclosure is shutting down...') - - -def on_error(e='Unknown'): - LOG.error(f'Enclosure failed: {e}') - - -def create_enclosure(platform): - """Create an enclosure based on the provided platform string. - - Args: - platform (str): platform name string - - Returns: - Enclosure object - """ - if platform == "mycroft_mark_1": - LOG.info("Creating Mark I Enclosure") - LOG.warning("'mycroft_mark_1' enclosure has been deprecated!\n" - "'mark_1' support is being migrated into PHAL\n" - "see https://github.com/OpenVoiceOS/ovos_phal_mk1") - from mycroft.deprecated.enclosure.mark1 import EnclosureMark1 - enclosure = EnclosureMark1() - elif platform == "mycroft_mark_2": - LOG.info("Creating Mark II Enclosure") - LOG.warning("'mycroft_mark_2' enclosure has been deprecated!\n" - "It was never implemented outside the mk2 feature branch\n" - "mark_2 support is being migrated into PHAL\n" - "see https://github.com/OpenVoiceOS/ovos_phal_mk2") - from mycroft.deprecated.enclosure.mark2 import EnclosureMark2 - enclosure = EnclosureMark2() - else: - LOG.info("Creating generic enclosure, platform='{}'".format(platform)) - from mycroft.deprecated.enclosure.generic import EnclosureGeneric - enclosure = EnclosureGeneric() - - return enclosure - - -def main(ready_hook=on_ready, error_hook=on_error, stopping_hook=on_stopping): - """Launch one of the available enclosure implementations. - - This depends on the configured platform and can currently either be - mycroft_mark_1 or mycroft_mark_2, if unconfigured a generic enclosure will be started. - - NOTE: in ovos-core the GUI protocol is handled in it's own service and not part of the enclosure like in mycroft-core! - You need to also run mycroft.gui process separately, it has been extracted into it's own module - """ - # Read the system configuration - config = Configuration() - - LOG.warning("mycroft.client.enclosure is DEPRECATED in ovos-core!") - LOG.warning("see https://github.com/OpenVoiceOS/ovos_PHAL") - - if not config.get("backwards_compat", True): - raise DeprecationWarning("Please run PHAL instead of enclosure") - - reset_sigint_handler() - setup_locale() - - platform = config.get("enclosure", {}).get("platform") - - if platform == "PHAL": - LOG.debug("Launching PHAL") - # config read from mycroft.conf - # "PHAL": { - # "ovos-PHAL-plugin-display-manager-ipc": {"enabled": true}, - # "ovos-PHAL-plugin-mk1": {"enabled": True} - # } - try: - from ovos_PHAL import PHAL - phal = PHAL() - phal.start() - wait_for_exit_signal() - except Exception as e: - LOG.exception("PHAL failed to launch!") - error_hook(e) - else: - enclosure = create_enclosure(platform) - if enclosure: - LOG.debug("Enclosure created") - try: - enclosure.run() - ready_hook() - except Exception as e: - error_hook(e) - else: - LOG.info("No enclosure available for this hardware, running headless") - - LOG.warning("Backwards compatibility is enabled, attempting to launch gui service...") - LOG.warning("Please run PHAL + gui service as separate processes instead!") - try: - service = GUIService() - service.run() - except Exception as e: - LOG.error(f"GUI : {e}") - service = None - - ready_hook() - wait_for_exit_signal() - - if enclosure: - enclosure.stop() - if service: - service.stop() - stopping_hook() - - -if __name__ == "__main__": - main() diff --git a/mycroft/deprecated/enclosure/mark1/__init__.py b/mycroft/deprecated/enclosure/mark1/__init__.py deleted file mode 100644 index e27ada24a675..000000000000 --- a/mycroft/deprecated/enclosure/mark1/__init__.py +++ /dev/null @@ -1,432 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -TODO: consider importing from PHAL if it's compatible -""" - -import subprocess -import time -from threading import Thread, Timer - -from ovos_config.locations import get_xdg_config_save_path -import mycroft.dialog -from mycroft.deprecated.enclosure.base import Enclosure -from ovos_backend_client.pairing import has_been_paired -from ovos_audio.utils import wait_while_speaking -from mycroft.deprecated.enclosure.mark1.arduino import EnclosureArduino -from mycroft.deprecated.enclosure.mark1.eyes import EnclosureEyes -from mycroft.deprecated.enclosure.mark1.mouth import EnclosureMouth -from ovos_config.config import LocalConf -from ovos_config.locations import USER_CONFIG -from ovos_bus_client.message import Message -from mycroft.util import play_wav, connected -from ovos_utils.signal import check_for_signal, create_signal -from mycroft.util.audio_test import record -from ovos_utils.log import LOG -from queue import Queue -from ovos_utils.file_utils import get_temp_path - - -# The Mark 1 hardware consists of a Raspberry Pi main CPU which is connected -# to an Arduino over the serial port. A custom serial protocol sends -# commands to control various visual elements which are controlled by the -# Arduino (e.g. two circular rings of RGB LEDs; and four 8x8 white LEDs). -# -# The Arduino can also send back notifications in response to either -# pressing or turning a rotary encoder. - - -class EnclosureReader(Thread): - """ - Reads data from Serial port. - - Listens to all commands sent by Arduino that must be be performed on - Mycroft Core. - - E.g. Mycroft Stop Feature - # . Arduino sends a Stop command after a button press on a Mycroft unit - # . ``EnclosureReader`` captures the Stop command - # . Notify all Mycroft Core processes (e.g. skills) to be stopped - - Note: A command is identified by a line break - """ - - def __init__(self, serial, bus, lang=None): - super(EnclosureReader, self).__init__(target=self.read) - self.alive = True - self.daemon = True - self.serial = serial - self.bus = bus - self.lang = lang or 'en-us' - self.start() - - # Notifications from mycroft-core - self.bus.on("mycroft.stop.handled", self.on_stop_handled) - - def read(self): - while self.alive: - try: - data = self.serial.readline()[:-2] - if data: - try: - data_str = data.decode() - except UnicodeError as e: - data_str = data.decode('utf-8', errors='replace') - LOG.warning('Invalid characters in response from ' - ' enclosure: {}'.format(repr(e))) - self.process(data_str) - except Exception as e: - LOG.error("Reading error: {0}".format(e)) - - def on_stop_handled(self, event): - # A skill performed a stop - check_for_signal('buttonPress') - - def process(self, data): - # TODO: Look into removing this emit altogether. - # We need to check if any other serial bus messages - # are handled by other parts of the code - if "mycroft.stop" not in data: - self.bus.emit(Message(data)) - - if "Command: system.version" in data: - # This happens in response to the "system.version" message - # sent during the construction of Enclosure() - self.bus.emit(Message("enclosure.started")) - - if "mycroft.stop" in data: - if has_been_paired(): - create_signal('buttonPress') - self.bus.emit(Message("mycroft.stop")) - - if "volume.up" in data: - self.bus.emit(Message("mycroft.volume.increase", - {'play_sound': True})) - - if "volume.down" in data: - self.bus.emit(Message("mycroft.volume.decrease", - {'play_sound': True})) - - if "system.test.begin" in data: - self.bus.emit(Message('recognizer_loop:sleep')) - - if "system.test.end" in data: - self.bus.emit(Message('recognizer_loop:wake_up')) - - if "mic.test" in data: - from alsaaudio import Mixer - mixer = Mixer() - prev_vol = mixer.getvolume()[0] - mixer.setvolume(35) - self.bus.emit(Message("speak", { - 'utterance': "I am testing one two three"})) - - time.sleep(0.5) # Prevents recording the loud button press - record(get_temp_path('test.wav', 3.0)) - mixer.setvolume(prev_vol) - play_wav(get_temp_path('test.wav')).communicate() - - # Test audio muting on arduino - subprocess.call('speaker-test -P 10 -l 0 -s 1', shell=True) - - if "unit.shutdown" in data: - # Eyes to soft gray on shutdown - self.bus.emit(Message("enclosure.eyes.color", - {'r': 70, 'g': 65, 'b': 69})) - self.bus.emit( - Message("enclosure.eyes.timedspin", - {'length': 12000})) - self.bus.emit(Message("enclosure.mouth.reset")) - time.sleep(0.5) # give the system time to pass the message - self.bus.emit(Message("system.shutdown")) - - if "unit.reboot" in data: - # Eyes to soft gray on reboot - self.bus.emit(Message("enclosure.eyes.color", - {'r': 70, 'g': 65, 'b': 69})) - self.bus.emit(Message("enclosure.eyes.spin")) - self.bus.emit(Message("enclosure.mouth.reset")) - time.sleep(0.5) # give the system time to pass the message - self.bus.emit(Message("system.reboot")) - - if "unit.setwifi" in data: - self.bus.emit(Message("system.wifi.setup", {'lang': self.lang})) - - if "unit.factory-reset" in data: - self.bus.emit(Message("speak", { - 'utterance': mycroft.dialog.get("reset to factory defaults")})) - subprocess.call( - (f'rm {get_xdg_config_save_path("mycroft")}' - '/mycroft/identity/identity2.json'), - shell=True) - subprocess.call( - 'rm ~/.mycroft/identity/identity2.json', - shell=True) - self.bus.emit(Message("system.wifi.reset")) - self.bus.emit(Message("system.ssh.disable")) - wait_while_speaking() - self.bus.emit(Message("enclosure.mouth.reset")) - self.bus.emit(Message("enclosure.eyes.spin")) - self.bus.emit(Message("enclosure.mouth.reset")) - time.sleep(5) # give the system time to process all messages - self.bus.emit(Message("system.reboot")) - - if "unit.enable-ssh" in data: - # This is handled by the wifi client - self.bus.emit(Message("system.ssh.enable")) - self.bus.emit(Message("speak", { - 'utterance': mycroft.dialog.get("ssh enabled")})) - - if "unit.disable-ssh" in data: - # This is handled by the wifi client - self.bus.emit(Message("system.ssh.disable")) - self.bus.emit(Message("speak", { - 'utterance': mycroft.dialog.get("ssh disabled")})) - - if "unit.enable-learning" in data or "unit.disable-learning" in data: - enable = 'enable' in data - word = 'enabled' if enable else 'disabled' - - LOG.info("Setting opt_in to: " + word) - new_config = {'opt_in': enable} - user_config = LocalConf(USER_CONFIG) - user_config.merge(new_config) - user_config.store() - - self.bus.emit(Message("speak", { - 'utterance': mycroft.dialog.get("learning " + word)})) - - def stop(self): - self.alive = False - - -class EnclosureWriter(Thread): - """ - Writes data to Serial port. - # . Enqueues all commands received from Mycroft enclosures - implementation - # . Process them on the received order by writing on the Serial port - - E.g. Displaying a text on Mycroft's Mouth - # . ``EnclosureMouth`` sends a text command - # . ``EnclosureWriter`` captures and enqueue the command - # . ``EnclosureWriter`` removes the next command from the queue - # . ``EnclosureWriter`` writes the command to Serial port - - Note: A command has to end with a line break - """ - - def __init__(self, serial, bus, size=16): - super(EnclosureWriter, self).__init__(target=self.flush) - self.alive = True - self.daemon = True - self.serial = serial - self.bus = bus - self.commands = Queue(size) - self.start() - - def flush(self): - while self.alive: - try: - cmd = self.commands.get() + '\n' - self.serial.write(cmd.encode()) - self.commands.task_done() - except Exception as e: - LOG.error("Writing error: {0}".format(e)) - - def write(self, command): - self.commands.put(str(command)) - - def stop(self): - self.alive = False - - -class EnclosureMark1(Enclosure): - """ - Serves as a communication interface between Arduino and Mycroft Core. - - ``Enclosure`` initializes and aggregates all enclosures implementation. - - E.g. ``EnclosureEyes``, ``EnclosureMouth`` and ``EnclosureArduino`` - - It also listens to the basic events in order to perform those core actions - on the unit. - - E.g. Start and Stop talk animation - """ - - _last_internet_notification = 0 - - def __init__(self): - super().__init__() - - self.__init_serial() - self.reader = EnclosureReader(self.serial, self.bus, self.lang) - self.writer = EnclosureWriter(self.serial, self.bus) - - # Prepare to receive message when the Arduino responds to the - # following "system.version" - self.bus.on("enclosure.started", self.on_arduino_responded) - self.arduino_responded = False - # Send a message to the Arduino across the serial line asking - # for a reply with version info. - self.writer.write("system.version") - # Start a 5 second timer. If the serial port hasn't received - # any acknowledgement of the "system.version" within those - # 5 seconds, assume there is nothing on the other end (e.g. - # we aren't running a Mark 1 with an Arduino) - Timer(5, self.check_for_response).start() - - # Notifications from mycroft-core - self.bus.on("enclosure.notify.no_internet", self.on_no_internet) - - def on_arduino_responded(self, event=None): - self.eyes = EnclosureEyes(self.bus, self.writer) - self.mouth = EnclosureMouth(self.bus, self.writer) - self.system = EnclosureArduino(self.bus, self.writer) - self.__register_events() - self.__reset() - self.arduino_responded = True - - # verify internet connection and prompt user on bootup if needed - if not connected(): - # We delay this for several seconds to ensure that the other - # clients are up and connected to the messagebus in order to - # receive the "speak". This was sometimes happening too - # quickly and the user wasn't notified what to do. - Timer(5, self._do_net_check).start() - - def on_no_internet(self, event=None): - if connected(): - # One last check to see if connection was established - return - - if time.time() - Enclosure._last_internet_notification < 30: - # don't bother the user with multiple notifications with 30 secs - return - - Enclosure._last_internet_notification = time.time() - - if has_been_paired(): - # Handle the translation within that code. - self.bus.emit(Message("speak", { - 'utterance': "This device is not connected to the Internet. " - "Either plug in a network cable or hold the " - "button on top for two seconds, then select " - "wifi from the menu"})) - else: - # enter wifi-setup mode automatically - self.bus.emit(Message('system.wifi.setup', {'lang': self.lang})) - - def __init_serial(self): - try: - self.port = self.config.get("port") - self.rate = self.config.get("rate") - self.timeout = self.config.get("timeout") - import serial - self.serial = serial.serial_for_url( - url=self.port, baudrate=self.rate, timeout=self.timeout) - LOG.info("Connected to: %s rate: %s timeout: %s" % - (self.port, self.rate, self.timeout)) - except Exception: - LOG.error("Impossible to connect to serial port: " + - str(self.port)) - raise - - def __register_events(self): - self.bus.on('enclosure.mouth.events.activate', - self.__register_mouth_events) - self.bus.on('enclosure.mouth.events.deactivate', - self.__remove_mouth_events) - self.bus.on('enclosure.reset', - self.__reset) - self.__register_mouth_events() - - def __register_mouth_events(self, event=None): - self.bus.on('recognizer_loop:record_begin', self.mouth.listen) - self.bus.on('recognizer_loop:record_end', self.mouth.reset) - self.bus.on('recognizer_loop:audio_output_start', self.mouth.talk) - self.bus.on('recognizer_loop:audio_output_end', self.mouth.reset) - - def __remove_mouth_events(self, event=None): - self.bus.remove('recognizer_loop:record_begin', self.mouth.listen) - self.bus.remove('recognizer_loop:record_end', self.mouth.reset) - self.bus.remove('recognizer_loop:audio_output_start', - self.mouth.talk) - self.bus.remove('recognizer_loop:audio_output_end', - self.mouth.reset) - - def __reset(self, event=None): - # Reset both the mouth and the eye elements to indicate the unit is - # ready for input. - self.writer.write("eyes.reset") - self.writer.write("mouth.reset") - - def speak(self, text): - self.bus.emit(Message("speak", {'utterance': text})) - - def check_for_response(self): - if not self.arduino_responded: - # There is nothing on the other end of the serial port - # close these serial-port readers and this process - self.writer.stop() - self.reader.stop() - self.serial.close() - self.bus.close() - - def _handle_pairing_complete(self, Message): - """ - Handler for 'mycroft.paired', unmutes the mic after the pairing is - complete. - """ - self.bus.emit(Message("mycroft.mic.unmute")) - - def _do_net_check(self): - LOG.info("Checking internet connection") - if not connected(): # and self.conn_monitor is None: - if has_been_paired(): - # TODO: Enclosure/localization - self.speak("This unit is not connected to the Internet. " - "Either plug in a network cable or hold the " - "button on top for two seconds, then select " - "wifi from the menu") - else: - # Begin the unit startup process, this is the first time it - # is being run with factory defaults. - - # TODO: Enclosure/localization - - # Don't listen to mic during this out-of-box experience - self.bus.emit(Message("mycroft.mic.mute")) - # Setup handler to unmute mic at the end of on boarding - # i.e. after pairing is complete - self.bus.once('mycroft.paired', self._handle_pairing_complete) - - self.speak(mycroft.dialog.get('mycroft.intro')) - wait_while_speaking() - time.sleep(2) # a pause sounds better than just jumping in - - # Kick off wifi-setup automatically - data = {'allow_timeout': False, 'lang': self.lang} - self.bus.emit(Message('system.wifi.setup', data)) diff --git a/mycroft/deprecated/enclosure/mark1/arduino.py b/mycroft/deprecated/enclosure/mark1/arduino.py deleted file mode 100644 index 09a58841f5b6..000000000000 --- a/mycroft/deprecated/enclosure/mark1/arduino.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -TODO: consider importing from PHAL if it's compatible -""" - - -class EnclosureArduino: - """ - Listens to enclosure commands for Mycroft's Arduino. - - Performs the associated command on Arduino by writing on the Serial port. - """ - - def __init__(self, bus, writer): - self.bus = bus - self.writer = writer - self.__init_events() - - def __init_events(self): - self.bus.on('enclosure.system.reset', self.reset) - self.bus.on('enclosure.system.mute', self.mute) - self.bus.on('enclosure.system.unmute', self.unmute) - self.bus.on('enclosure.system.blink', self.blink) - - def reset(self, event=None): - self.writer.write("system.reset") - - def mute(self, event=None): - self.writer.write("system.mute") - - def unmute(self, event=None): - self.writer.write("system.unmute") - - def blink(self, event=None): - times = 1 - if event and event.data: - times = event.data.get("times", times) - self.writer.write("system.blink=" + str(times)) diff --git a/mycroft/deprecated/enclosure/mark1/eyes.py b/mycroft/deprecated/enclosure/mark1/eyes.py deleted file mode 100644 index ebf13193d89a..000000000000 --- a/mycroft/deprecated/enclosure/mark1/eyes.py +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -TODO: consider importing from PHAL if it's compatible -""" - - -class EnclosureEyes: - """ - Listens to enclosure commands for Mycroft's Eyes. - - Performs the associated command on Arduino by writing on the Serial port. - """ - - def __init__(self, bus, writer): - self.bus = bus - self.writer = writer - - self._num_pixels = 12 * 2 - self._current_rgb = [(255, 255, 255) for i in range(self._num_pixels)] - self.__init_events() - - def __init_events(self): - self.bus.on('enclosure.eyes.on', self.on) - self.bus.on('enclosure.eyes.off', self.off) - self.bus.on('enclosure.eyes.blink', self.blink) - self.bus.on('enclosure.eyes.narrow', self.narrow) - self.bus.on('enclosure.eyes.look', self.look) - self.bus.on('enclosure.eyes.color', self.color) - self.bus.on('enclosure.eyes.level', self.brightness) - self.bus.on('enclosure.eyes.volume', self.volume) - self.bus.on('enclosure.eyes.spin', self.spin) - self.bus.on('enclosure.eyes.timedspin', self.timed_spin) - self.bus.on('enclosure.eyes.reset', self.reset) - self.bus.on('enclosure.eyes.setpixel', self.set_pixel) - self.bus.on('enclosure.eyes.fill', self.fill) - - self.bus.on('enclosure.eyes.rgb.get', self.handle_get_color) - - def handle_get_color(self, message): - """Get the eye RGB color for all pixels - Returns: - (list) list of (r,g,b) tuples for each eye pixel - """ - self.bus.emit(message.reply("enclosure.eyes.rgb", - {"pixels": self._current_rgb})) - - def on(self, event=None): - self.writer.write("eyes.on") - - def off(self, event=None): - self.writer.write("eyes.off") - - def blink(self, event=None): - side = "b" - if event and event.data: - side = event.data.get("side", side) - self.writer.write("eyes.blink=" + side) - - def narrow(self, event=None): - self.writer.write("eyes.narrow") - - def look(self, event=None): - if event and event.data: - side = event.data.get("side", "") - self.writer.write("eyes.look=" + side) - - def color(self, event=None): - r, g, b = 255, 255, 255 - if event and event.data: - r = int(event.data.get("r", r)) - g = int(event.data.get("g", g)) - b = int(event.data.get("b", b)) - color = (r * 65536) + (g * 256) + b - self._current_rgb = [(r, g, b) for i in range(self._num_pixels)] - self.writer.write("eyes.color=" + str(color)) - - def set_pixel(self, event=None): - idx = 0 - r, g, b = 255, 255, 255 - if event and event.data: - idx = int(event.data.get("idx", idx)) - r = int(event.data.get("r", r)) - g = int(event.data.get("g", g)) - b = int(event.data.get("b", b)) - self._current_rgb[idx] = (r, g, b) - color = (r * 65536) + (g * 256) + b - self.writer.write("eyes.set=" + str(idx) + "," + str(color)) - - def fill(self, event=None): - amount = 0 - if event and event.data: - percent = int(event.data.get("percentage", 0)) - amount = int(round(23.0 * percent / 100.0)) - self.writer.write("eyes.fill=" + str(amount)) - - def brightness(self, event=None): - level = 30 - if event and event.data: - level = event.data.get("level", level) - self.writer.write("eyes.level=" + str(level)) - - def volume(self, event=None): - volume = 4 - if event and event.data: - volume = event.data.get("volume", volume) - self.writer.write("eyes.volume=" + str(volume)) - - def reset(self, event=None): - self.writer.write("eyes.reset") - - def spin(self, event=None): - self.writer.write("eyes.spin") - - def timed_spin(self, event=None): - length = 5000 - if event and event.data: - length = event.data.get("length", length) - self.writer.write("eyes.spin=" + str(length)) diff --git a/mycroft/deprecated/enclosure/mark1/mouth.py b/mycroft/deprecated/enclosure/mark1/mouth.py deleted file mode 100644 index 47883021f7a7..000000000000 --- a/mycroft/deprecated/enclosure/mark1/mouth.py +++ /dev/null @@ -1,297 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -TODO: consider importing from PHAL if it's compatible -""" - -import time - - -class EnclosureMouth: - """ - Listens to enclosure commands for Mycroft's Mouth. - - Performs the associated command on Arduino by writing on the Serial port. - """ - - def __init__(self, bus, writer): - self.bus = bus - self.writer = writer - self.is_timer_on = False - self.__init_events() - self.showing_visemes = False - - def __init_events(self): - self.bus.on('enclosure.mouth.reset', self.reset) - self.bus.on('enclosure.mouth.talk', self.talk) - self.bus.on('enclosure.mouth.think', self.think) - self.bus.on('enclosure.mouth.listen', self.listen) - self.bus.on('enclosure.mouth.smile', self.smile) - self.bus.on('enclosure.mouth.viseme_list', self.viseme_list) - self.bus.on('enclosure.mouth.text', self.text) - self.bus.on('enclosure.mouth.display', self.display) - self.bus.on('enclosure.mouth.display_image', self.display_image) - self.bus.on('enclosure.weather.display', self.display_weather) - self.bus.on('mycroft.stop', self.clear_visemes) - self.bus.on('enclosure.mouth.events.activate', - self._activate_visemes) - self.bus.on('enclosure.mouth.events.deactivate', - self._deactivate_visemes) - - def _activate_visemes(self, event=None): - self.bus.on('enclosure.mouth.viseme_list', self.viseme_list) - - def _deactivate_visemes(self, event=None): - self.bus.remove('enclosure.mouth.viseme_list', self.viseme_list) - - def reset(self, event=None): - self.writer.write("mouth.reset") - - def talk(self, event=None): - self.writer.write("mouth.talk") - - def think(self, event=None): - self.writer.write("mouth.think") - - def listen(self, event=None): - self.writer.write("mouth.listen") - - def smile(self, event=None): - self.writer.write("mouth.smile") - - def viseme_list(self, event=None): - if event and event.data: - start = event.data['start'] - visemes = event.data['visemes'] - self.showing_visemes = True - for code, end in visemes: - if not self.showing_visemes: - break - if time.time() < start + end: - self.writer.write('mouth.viseme=' + code) - time.sleep(start + end - time.time()) - self.reset() - - def clear_visemes(self, event=None): - self.showing_visemes = False - - def text(self, event=None): - text = "" - if event and event.data: - text = event.data.get("text", text) - self.writer.write("mouth.text=" + text) - - def __display(self, code, clear_previous, x_offset, y_offset): - """ Write the encoded image to enclosure screen. - - Args: - code (str): encoded image to display - clean_previous (str): if "True" will clear the screen before - drawing. - x_offset (int): x direction offset - y_offset (int): y direction offset - """ - clear_previous = int(str(clear_previous) == "True") - clear_previous = "cP=" + str(clear_previous) + "," - x_offset = "x=" + str(x_offset) + "," - y_offset = "y=" + str(y_offset) + "," - - message = "mouth.icon=" + x_offset + y_offset + clear_previous + code - # Check if message exceeds Arduino's serial buffer input limit 64 bytes - if len(message) > 60: - message1 = message[:31] + "$" - message2 = "mouth.icon=$" + message[31:] - self.writer.write(message1) - time.sleep(0.25) # writer bugs out if sending messages too rapidly - self.writer.write(message2) - else: - time.sleep(0.1) - self.writer.write(message) - - def display(self, event=None): - """ Display a Mark-1 specific code. - Args: - event (Message): messagebus message with data to display - """ - code = "" - x_offset = "" - y_offset = "" - clear_previous = "" - if event and event.data: - code = event.data.get("img_code", code) - x_offset = int(event.data.get("xOffset", x_offset)) - y_offset = int(event.data.get("yOffset", y_offset)) - clear_previous = event.data.get("clearPrev", clear_previous) - self.__display(code, clear_previous, x_offset, y_offset) - - def display_image(self, event=None): - """ Display an image on the enclosure. - - The method uses PIL to convert the image supplied into a code - suitable for the Mark-1 display. - - Args: - event (Message): messagebus message with data to display - """ - if not event: - return - - from PIL import Image - - image_absolute_path = event.data['img_path'] - refresh = event.data['clearPrev'] - invert = event.data['invert'] - x_offset = event.data['xOffset'] - y_offset = event.data['yOffset'] - threshold = event.data.get('threshold', 70) # default threshold - # to understand how this funtion works you need to understand how the - # Mark I arduino proprietary encoding works to display to the faceplate - img = Image.open(image_absolute_path).convert("RGBA") - img2 = Image.new('RGBA', img.size, (255, 255, 255)) - width = img.size[0] - height = img.size[1] - - # strips out alpha value and blends it with the RGB values - img = Image.alpha_composite(img2, img) - img = img.convert("L") - - # crop image to only allow a max width of 16 - if width > 32: - img = img.crop((0, 0, 32, height)) - width = img.size[0] - height = img.size[1] - - # crop the image to limit the max height of 8 - if height > 8: - img = img.crop((0, 0, width, 8)) - width = img.size[0] - height = img.size[1] - - encode = "" - - # Each char value represents a width number starting with B=1 - # then increment 1 for the next. ie C=2 - width_codes = ['B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', - 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`', 'a'] - - height_codes = ['B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'] - - encode += width_codes[width - 1] - encode += height_codes[height - 1] - # Turn the image pixels into binary values 1's and 0's - # the Mark I face plate encoding uses binary values to - # binary_values returns a list of 1's and 0s'. ie ['1', '1', '0', ...] - binary_values = [] - for i in range(width): - for j in range(height): - if img.getpixel((i, j)) < threshold: - if invert is False: - binary_values.append('1') - else: - binary_values.append('0') - else: - if invert is False: - binary_values.append('0') - else: - binary_values.append('1') - - # these values are used to determine how binary values - # needs to be grouped together - number_of_top_pixel = 0 - number_of_bottom_pixel = 0 - - if height > 4: - number_of_top_pixel = 4 - number_of_bottom_pixel = height - 4 - else: - number_of_top_pixel = height - - # this loop will group together the individual binary values - # ie. binary_list = ['1111', '001', '0101', '100'] - binary_list = [] - binary_code = '' - increment = 0 - alternate = False - for val in binary_values: - binary_code += val - increment += 1 - if increment == number_of_top_pixel and alternate is False: - # binary code is reversed for encoding - binary_list.append(binary_code[::-1]) - increment = 0 - binary_code = '' - alternate = True - elif increment == number_of_bottom_pixel and alternate is True: - binary_list.append(binary_code[::-1]) - increment = 0 - binary_code = '' - alternate = False - - # Code to let the Makrk I arduino know where to place the - # pixels on the faceplate - pixel_codes = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P'] - - for binary_values in binary_list: - number = int(binary_values, 2) - pixel_code = pixel_codes[number] - encode += pixel_code - - self.__display(encode, refresh, x_offset, y_offset) - - def display_weather(self, event=None): - if event and event.data: - # Convert img_code to icon - img_code = event.data.get("img_code", None) - icon = None - if img_code == 0: - # sunny - icon = "IICEIBMDNLMDIBCEAA" - elif img_code == 1: - # partly cloudy - icon = "IIEEGBGDHLHDHBGEEA" - elif img_code == 2: - # cloudy - icon = "IIIBMDMDODODODMDIB" - elif img_code == 3: - # light rain - icon = "IIMAOJOFPBPJPFOBMA" - elif img_code == 4: - # raining - icon = "IIMIOFOBPFPDPJOFMA" - elif img_code == 5: - # storming - icon = "IIAAIIMEODLBJAAAAA" - elif img_code == 6: - # snowing - icon = "IIJEKCMBPHMBKCJEAA" - elif img_code == 7: - # wind/mist - icon = "IIABIBIBIJIJJGJAGA" - - temp = event.data.get("temp", None) - if icon is not None and temp is not None: - icon = "x=2," + icon - msg = "weather.display=" + str(temp) + "," + str(icon) - self.writer.write(msg) diff --git a/mycroft/deprecated/enclosure/mark2/__init__.py b/mycroft/deprecated/enclosure/mark2/__init__.py deleted file mode 100644 index c87b7e22e36f..000000000000 --- a/mycroft/deprecated/enclosure/mark2/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from mycroft.deprecated.enclosure.base import Enclosure as EnclosureMark2 diff --git a/mycroft/deprecated/enclosure/version.txt b/mycroft/deprecated/enclosure/version.txt deleted file mode 100644 index 9df886c42a1e..000000000000 --- a/mycroft/deprecated/enclosure/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.4.2 diff --git a/mycroft/deprecated/skills/__init__.py b/mycroft/deprecated/skills/__init__.py deleted file mode 100644 index 561a853a8b86..000000000000 --- a/mycroft/deprecated/skills/__init__.py +++ /dev/null @@ -1,198 +0,0 @@ -""" -NOTE: this is dead code! do not use! -This file is only present to ensure backwards compatibility -in case someone is importing from here -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -import collections -import csv -import re -from os import walk -from os.path import splitext, join -from ovos_backend_client.pairing import is_paired -from ovos_bus_client.apis.enclosure import EnclosureAPI -from mycroft.util.format import expand_options -from ovos_utils.log import LOG -from ovos_workshop.intents import munge_regex, to_alnum - -RASPBERRY_PI_PLATFORMS = ('mycroft_mark_1', 'picroft', 'mycroft_mark_2pi') - -ONE_MINUTE = 60 - - -def skill_is_blacklisted(skill): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns False - """ - # this is a internal msm helper - # it should have been private - # cant remove to keep api compatibility - # nothing in the wild should be using this - LOG.warning("skill_is_blacklisted is an internal method and has been deprecated. Stop using it!") - return False - - -class DevicePrimer: - """DEPRECATED: this class has been fully deprecated, stop using it! - Only here to provide public api compatibility but it does absolutely nothing! - """ - - def __init__(self, message_bus_client, config=None): - self.bus = message_bus_client - self.platform = "unknown" - self.enclosure = EnclosureAPI(self.bus) - self.backend_down = False - - @property - def is_paired(self): - return is_paired() - - def prepare_device(self): - """Internet dependent updates of various aspects of the device.""" - LOG.warning("DevicePrimer has been deprecated!") - - -def read_vocab_file(path): - """ Read voc file. - - This reads a .voc file, stripping out empty lines comments and expand - parentheses. It returns each line as a list of all expanded - alternatives. - - Args: - path (str): path to vocab file. - - Returns: - List of Lists of strings. - """ - LOG.warning("read_vocab_file is deprecated! " - "use SkillResources class instead") - vocab = [] - with open(path, 'r', encoding='utf8') as voc_file: - for line in voc_file.readlines(): - if line.startswith('#') or line.strip() == '': - continue - vocab.append(expand_options(line.lower())) - return vocab - - -def load_regex_from_file(path, skill_id): - """Load regex from file - The regex is sent to the intent handler using the message bus - - Args: - path: path to vocabulary file (*.voc) - skill_id: skill_id to the regex is tied to - """ - LOG.warning("read_regex_from_file is deprecated! " - "use SkillResources class instead") - regexes = [] - if path.endswith('.rx'): - with open(path, 'r', encoding='utf8') as reg_file: - for line in reg_file.readlines(): - if line.startswith("#"): - continue - LOG.debug('regex pre-munge: ' + line.strip()) - regex = munge_regex(line.strip(), skill_id) - LOG.debug('regex post-munge: ' + regex) - # Raise error if regex can't be compiled - try: - re.compile(regex) - regexes.append(regex) - except Exception as e: - LOG.warning(f'Failed to compile regex {regex}: {e}') - - return regexes - - -def load_vocabulary(basedir, skill_id): - """Load vocabulary from all files in the specified directory. - - Args: - basedir (str): path of directory to load from (will recurse) - skill_id: skill the data belongs to - Returns: - dict with intent_type as keys and list of list of lists as value. - """ - LOG.warning("load_vocabulary is deprecated! " - "use SkillResources class instead") - vocabs = {} - for path, _, files in walk(basedir): - for f in files: - if f.endswith(".voc"): - vocab_type = to_alnum(skill_id) + splitext(f)[0] - vocs = read_vocab_file(join(path, f)) - if vocs: - vocabs[vocab_type] = vocs - return vocabs - - -def load_regex(basedir, skill_id): - """Load regex from all files in the specified directory. - - Args: - basedir (str): path of directory to load from - bus (messagebus emitter): messagebus instance used to send the vocab to - the intent service - skill_id (str): skill identifier - """ - LOG.warning("load_regex is deprecated! " - "use SkillResources class instead") - regexes = [] - for path, _, files in walk(basedir): - for f in files: - if f.endswith(".rx"): - regexes += load_regex_from_file(join(path, f), skill_id) - return regexes - - -def read_value_file(filename, delim): - """Read value file. - - The value file is a simple csv structure with a key and value. - - Args: - filename (str): file to read - delim (str): csv delimiter - - Returns: - OrderedDict with results. - """ - LOG.warning("read_value_file is deprecated! " - "use SkillResources class instead") - result = collections.OrderedDict() - - if filename: - with open(filename) as f: - reader = csv.reader(f, delimiter=delim) - for row in reader: - # skip blank or comment lines - if not row or row[0].startswith("#"): - continue - if len(row) != 2: - continue - - result[row[0]] = row[1] - return result - - -def read_translated_file(filename, data): - """Read a file inserting data. - - Args: - filename (str): file to read - data (dict): dictionary with data to insert into file - - Returns: - list of lines. - """ - LOG.warning("read_translated_file is deprecated! " - "use SkillResources class instead") - if filename: - with open(filename) as f: - text = f.read().replace('{{', '{').replace('}}', '}') - return text.format(**data or {}).rstrip('\n').split('\n') - else: - return None diff --git a/mycroft/deprecated/skills/msm_wrapper.py b/mycroft/deprecated/skills/msm_wrapper.py deleted file mode 100644 index 5a8fcf30b6ab..000000000000 --- a/mycroft/deprecated/skills/msm_wrapper.py +++ /dev/null @@ -1,160 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -""" -NOTE: this is dead code! do not use! -This file is only present to ensure backwards compatibility -in case someone is importing from here -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from collections import namedtuple -from os import path, makedirs - -from combo_lock import ComboLock -from ovos_utils.log import LOG -from ovos_utils.file_utils import get_temp_path -from mycroft.skills.skill_loader import get_default_skills_directory - -from mock_msm import \ - MycroftSkillsManager as MockMSM, \ - SkillRepo as MockSkillRepo - -from ovos_config.locations import get_xdg_data_save_path - -import warnings - -warnings.warn( - "The OpenVoiceOS team regards msm_wrapper.py as dead code. " - "It's available for backwards compatibility with upstream projects, and may be removed in a future update. " - "If you need this functionality use the msm package directly instead" -) - - -from msm.exceptions import MsmException -from msm import MycroftSkillsManager, SkillRepo - -MsmConfig = namedtuple( - 'MsmConfig', - [ - 'platform', - 'repo_branch', - 'repo_cache', - 'repo_url', - 'skills_dir', - 'old_skills_dir', - 'versioned', - 'disabled' - ] -) - - -def _init_msm_lock(): - msm_lock = None - try: - msm_lock = ComboLock(get_temp_path('mycroft-msm.lck')) - LOG.debug('mycroft-msm combo lock instantiated') - except Exception: - LOG.exception('Failed to create msm lock!') - - return msm_lock - - -def build_msm_config(device_config: dict) -> MsmConfig: - LOG.warning("build_msm_config has been deprecated\n" - "use msm package directly instead") - msm_config = device_config['skills'].get('msm', {}) - msm_repo_config = msm_config.get('repo', {}) - enclosure_config = device_config.get('enclosure', {}) - data_dir = path.expanduser(device_config.get('data_dir', get_xdg_data_save_path())) - skills_dir = get_default_skills_directory(device_config) - old_skills_dir = path.join(data_dir, msm_config.get('directory', "skills")) - - return MsmConfig( - platform=enclosure_config.get('platform', 'default'), - repo_branch=msm_repo_config.get('branch', "21.02"), - repo_cache=path.join(data_dir, msm_repo_config.get( - 'cache', ".skills-repo")), - repo_url=msm_repo_config.get( - 'url', "https://github.com/MycroftAI/mycroft-skills"), - skills_dir=skills_dir, - old_skills_dir=old_skills_dir, - versioned=msm_config.get('versioned', True), - disabled=msm_config.get("disabled", not msm_config) - ) - - -def create_msm(msm_config: MsmConfig) -> MycroftSkillsManager: - """Returns an instantiated MSM object. - - This function is cached because it can take as long as 15 seconds to - instantiate MSM. Caching the instance improves performance significantly, - especially during the boot sequence when this function is called multiple - times. - """ - if msm_config.disabled: - LOG.debug("MSM is disabled, using mock_msm") - repo_clazz = MockSkillRepo - msm_clazz = MockMSM - else: - repo_clazz = SkillRepo - msm_clazz = MycroftSkillsManager - - if msm_config.repo_url != "https://github.com/MycroftAI/mycroft-skills": - LOG.warning("You have enabled a third-party skill store.\n" - "Unable to guarantee the safety of skills from " - "sources other than the Mycroft Marketplace.\n" - "Proceed with caution.") - msm_lock = _init_msm_lock() - LOG.debug('Acquiring lock to instantiate MSM') - with msm_lock: - if not path.exists(msm_config.skills_dir): - makedirs(msm_config.skills_dir) - - # NOTE newer versions of msm do not have repo_cache param - # XDG support is version dependent - try: - msm_skill_repo = repo_clazz( - msm_config.repo_cache, - msm_config.repo_url, - msm_config.repo_branch - ) - except: - msm_skill_repo = repo_clazz( - msm_config.repo_url, - msm_config.repo_branch - ) - - # NOTE older versions of msm do not have old_skills_dir param - # XDG support is version dependent - try: - msm_instance = msm_clazz( - platform=msm_config.platform, - old_skills_dir=msm_config.old_skills_dir, - repo=msm_skill_repo, - skills_dir=msm_config.skills_dir, - versioned=msm_config.versioned - ) - except: - msm_instance = msm_clazz( - platform=msm_config.platform, - skills_dir=msm_config.skills_dir, - repo=msm_skill_repo, - versioned=msm_config.versioned - ) - LOG.debug('Releasing MSM instantiation lock.') - - return msm_instance diff --git a/mycroft/deprecated/skills/settings.py b/mycroft/deprecated/skills/settings.py deleted file mode 100644 index 2e402ab07f4b..000000000000 --- a/mycroft/deprecated/skills/settings.py +++ /dev/null @@ -1,398 +0,0 @@ -""" -NOTE: this is dead code! do not use! -This file is only present to ensure backwards compatibility -in case someone is importing from here -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -import json -import os -from os.path import dirname, basename -from pathlib import Path -from threading import Timer, Lock - -import yaml - -from ovos_backend_client.pairing import is_paired -from ovos_backend_client.api import DeviceApi -from ovos_bus_client.message import Message -from mycroft.util.file_utils import ensure_directory_exists -from ovos_utils.log import LOG -from ovos_config.config import Configuration -from ovos_config.locations import get_xdg_cache_save_path -from ovos_backend_client.settings import get_display_name - - -# Path to remote cache -REMOTE_CACHE = Path(get_xdg_cache_save_path(), 'remote_skill_settings.json') - - -class UploadQueue: - """Queue for holding loaders with data that still needs to be uploaded. - - This queue can be used during startup to capture all loaders - and then processing can be triggered at a later stage when the system is - connected to the backend. - - After all queued settingsmeta has been processed and the queue is empty - the queue will set the self.started flag. - """ - - def __init__(self): - self._queue = [] - self.started = False - self.lock = Lock() - - def start(self): - """Start processing of the queue.""" - self.started = True - self.send() - - def stop(self): - """Stop the queue, and hinder any further transmissions.""" - self.started = False - - def send(self): - """Loop through all stored loaders triggering settingsmeta upload.""" - with self.lock: - queue = self._queue - self._queue = [] - if queue: - LOG.info('New Settings meta to upload.') - for loader in queue: - if self.started: - loader.instance.settings_meta.upload() - else: - break - - def __len__(self): - return len(self._queue) - - def put(self, loader): - """Append a skill loader to the queue. - - If a loader is already present it's removed in favor of the new entry. - """ - if self.started: - LOG.info('Updating settings meta during runtime...') - with self.lock: - # Remove existing loader - self._queue = [e for e in self._queue if e != loader] - self._queue.append(loader) - - -class SettingsMetaUploader: - """Synchronize the contents of the settingsmeta.json file with the backend. - - The settingsmeta.json (or settingsmeta.yaml) file is defined by the skill - author. It defines the user-configurable settings for a skill and contains - instructions for how to display the skill's settings in the Selene web - application (https://account.mycroft.ai). - """ - _msm_skill_display_name = None - _settings_meta_path = None - - def __init__(self, skill_directory: str, skill_name="", skill_id=""): - self.skill_directory = Path(skill_directory) - if skill_name: - LOG.warning("skill_name is deprecated! use skill_id instead") - self.skill_id = skill_id or skill_name or basename(self.skill_directory) - self.json_path = self.skill_directory.joinpath('settingsmeta.json') - self.yaml_path = self.skill_directory.joinpath('settingsmeta.yaml') - self.config = Configuration() - self.settings_meta = {} - self.api = None - self.upload_timer = None - self.sync_enabled = self.config["server"] \ - .get("sync_skill_settings", False) - if not self.sync_enabled: - LOG.info("Skill settings sync is disabled, settingsmeta will " - "not be uploaded") - - self._stopped = None - - @property - def skill_name(self): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns self.skill_id - """ - LOG.warning("self.skill_name is deprecated! use self.skill_id instead") - return self.skill_id - - @skill_name.setter - def skill_name(self, val): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and sets self.skill_id - """ - LOG.warning("self.skill_name is deprecated! use self.skill_id instead") - self.skill_id = val - - @property - def msm(self): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns None - """ - # unused but need to keep api backwards compatible - # log a warning and move on - LOG.warning("msm has been deprecated\n" - "DO NOT use self.msm property") - return None - - def get_local_skills(self): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns empty dictionary - """ - # unused but need to keep api backwards compatible - # log a warning and move on - LOG.warning("msm has been deprecated, do not use this utility method\n" - "get_local_skills always returns an empty dict") - return {} - - @property - def skill_gid(self): - """Skill identifier recognized by selene backend""" - api = self.api or DeviceApi() - if api.identity.uuid: - return f'@{api.identity.uuid}|{self.skill_id}' - return f'@|{self.skill_id}' - - @property - def msm_skill_display_name(self): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns self.skill_display_name - """ - LOG.warning("msm_skill_display_name has been deprecated\n" - "use skill_display_name instead") - return self.skill_display_name - - @property - def skill_display_name(self): - """Display name for use in settings meta.""" - return get_display_name(self.skill_id.split(".")[0]) - - @property - def settings_meta_path(self): - """Fully qualified path to the settingsmeta file.""" - if self._settings_meta_path is None: - if self.yaml_path.is_file(): - self._settings_meta_path = self.yaml_path - else: - self._settings_meta_path = self.json_path - - return self._settings_meta_path - - def upload(self): - """Upload the contents of the settingsmeta file to Mycroft servers. - - The settingsmeta file does not change often, if at all. Only perform - the upload if a change in the file is detected. - - NOTE: docstrs are wrong, no checks if file changed anywhere - """ - if not self.sync_enabled: - return - synced = False - if is_paired(): - self.api = DeviceApi() - if self.api.identity.uuid: - settings_meta_file_exists = ( - self.json_path.is_file() or - self.yaml_path.is_file() - ) - if settings_meta_file_exists: - self._load_settings_meta_file() - - self._update_settings_meta() - LOG.debug('Uploading settings meta for ' + self.skill_gid) - synced = self._issue_api_call() - else: - LOG.debug('settingsmeta.json not uploaded - no identity') - else: - LOG.debug('settingsmeta.json not uploaded - device is not paired') - - if not synced and not self._stopped: - self.upload_timer = Timer(60, self.upload) - self.upload_timer.daemon = True - self.upload_timer.start() - - def stop(self): - """Stop upload attempts if Timer is running.""" - if self.upload_timer: - self.upload_timer.cancel() - # Set stopped flag if upload is running when stop is called. - self._stopped = True - - def _load_settings_meta_file(self): - """Read the contents of the settingsmeta file into memory.""" - _, ext = os.path.splitext(str(self.settings_meta_path)) - is_json_file = self.settings_meta_path.suffix == ".json" - try: - with open(str(self.settings_meta_path)) as meta_file: - if is_json_file: - self.settings_meta = json.load(meta_file) - else: - self.settings_meta = yaml.safe_load(meta_file) - except Exception: - LOG.error(f"Failed to load settingsmeta file: {self.settings_meta_path}") - - def _update_settings_meta(self): - """Make sure the skill gid and name are included in settings meta.""" - # Insert skill_gid and display_name - self.settings_meta.update( - skill_gid=self.skill_gid, - display_name=( - self.skill_display_name or - self.settings_meta.get('name') or - get_display_name(self.skill_id.split(".")[0]) - ) - ) - for deprecated in ('color', 'identifier', 'name'): - if deprecated in self.settings_meta: - LOG.warning( - f'DEPRECATION WARNING: The "{deprecated}" attribute in the ' - 'settingsmeta file is no longer supported.' - ) - del (self.settings_meta[deprecated]) - - def _issue_api_call(self): - """Use the API to send the settings meta to the server. - - NOTE: mycroft-core will upload settings meta JSON containing - a skill gid and name even if a skill does not have a settingsmeta file - - In ovos-core we do not upload this, selene does not need to - know about the skills we have installed if they dont require web settings - """ - if not self.settings_meta.get("skillMetadata"): - return False - try: - self.api.upload_skill_metadata(self.settings_meta) - except Exception as e: - LOG.error(f'Failed to upload skill settings meta for {self.skill_gid}') - return False - return True - - -def load_remote_settings_cache(): - """Load cached remote skill settings. - - Returns: - (dict) Loaded remote settings cache or None of none exists. - """ - remote_settings = {} - if REMOTE_CACHE.exists(): - try: - with open(str(REMOTE_CACHE)) as cache: - remote_settings = json.load(cache) - except Exception as error: - LOG.warning('Failed to read remote_cache ({})'.format(error)) - return remote_settings - - -def save_remote_settings_cache(remote_settings): - """Save updated remote settings to cache file. - - Args: - remote_settings (dict): downloaded remote settings. - """ - try: - ensure_directory_exists(dirname(str(REMOTE_CACHE))) - with open(str(REMOTE_CACHE), 'w') as cache: - json.dump(remote_settings, cache) - except Exception as error: - LOG.warning('Failed to write remote_cache. ({})'.format(error)) - else: - LOG.debug('Updated local cache of remote skill settings.') - - -class SkillSettingsDownloader: - """Manages download of skill settings. - - Performs settings download on a repeating Timer. If a change is seen - the data is sent to the relevant skill. - """ - - def __init__(self, bus): - self.bus = bus - self.continue_downloading = True - self.last_download_result = load_remote_settings_cache() - - self.api = DeviceApi() - self.download_timer = None - - self.sync_enabled = Configuration().get("server", {}).get("sync_skill_settings", False) - - if not self.sync_enabled: - LOG.debug("Skill settings sync is disabled, backend settings will " - "not be downloaded") - - def stop_downloading(self): - """Stop synchronizing backend and core.""" - self.continue_downloading = False - if self.download_timer: - self.download_timer.cancel() - - # TODO: implement as websocket - def download(self, message=None): - """Download the settings stored on the backend and check for changes - - When used as a messagebus handler a message is passed but not used. - """ - if not self.sync_enabled: - return - if is_paired(): - remote_settings = self._get_remote_settings() - if remote_settings: - settings_changed = self.last_download_result != remote_settings - if settings_changed: - LOG.debug('Skill settings changed since last download') - self._emit_settings_change_events(remote_settings) - self.last_download_result = remote_settings - save_remote_settings_cache(remote_settings) - else: - LOG.debug('No skill settings changes since last download') - else: - LOG.debug('Settings not downloaded - device is not paired') - # If this method is called outside of the timer loop, ensure the - # existing timer is canceled before starting a new one. - if self.download_timer: - self.download_timer.cancel() - - if self.continue_downloading: - self.download_timer = Timer(60, self.download) - self.download_timer.daemon = True - self.download_timer.start() - - def _get_remote_settings(self): - """Get the settings for this skill from the server - - Returns: - skill_settings (dict or None): returns a dict on success, else None - """ - try: - remote_settings = self.api.get_skill_settings() - except Exception: - LOG.error('Failed to download remote settings from server.') - remote_settings = None - - return remote_settings - - def _emit_settings_change_events(self, remote_settings): - """Emit changed settings events for each affected skill.""" - for skill_gid, skill_settings in remote_settings.items(): - settings_changed = False - try: - previous_settings = self.last_download_result.get(skill_gid) - except Exception: - LOG.error('error occurred handling setting change events') - else: - if previous_settings != skill_settings: - settings_changed = True - if settings_changed: - LOG.info(f'Emitting skill.settings.change event for skill {skill_gid}') - message = Message( - 'mycroft.skills.settings.changed', - data={skill_gid: skill_settings} - ) - self.bus.emit(message) diff --git a/mycroft/deprecated/skills/skill_updater.py b/mycroft/deprecated/skills/skill_updater.py deleted file mode 100644 index 443955029a67..000000000000 --- a/mycroft/deprecated/skills/skill_updater.py +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Periodically run by skill manager to update skills and post the manifest.""" - -from combo_lock import ComboLock - -from ovos_utils.file_utils import get_temp_path -from ovos_utils.log import LOG -from ovos_config.config import Configuration - -ONE_HOUR = 3600 -FIVE_MINUTES = 300 # number of seconds in a minute - - -class SkillUpdater: - """ - DEPRECATED - most of this class is now useless and logs warnings only - Please use SeleneSkillManifestUploader to post skills manifest - Skill updates are no longer handled by core - - Class facilitating skill update / install actions. - - Arguments - bus (MessageBusClient): Optional bus emitter Used to communicate - with the mycroft core system and handle - commands. - """ - - def __init__(self, bus=None): - self.installed_skills = set() - self.msm_lock = ComboLock(get_temp_path('mycroft-msm.lck')) - self.install_retries = 0 - self.config = Configuration() - update_interval = self.config['skills'].get('update_interval', 1.0) - self.update_interval = int(update_interval) * ONE_HOUR - self.dot_msm_path = "/tmp/.msm" - self.next_download = 0 - self.default_skill_install_error = False - - self.post_manifest(True) - if bus: - LOG.warning("bus argument has been deprecated") - - @property - def installed_skills_file_path(self): - """Property representing the path of the installed skills file.""" - from mycroft.skills.skill_updater import SeleneSkillManifestUploader - return SeleneSkillManifestUploader().skill_manifest.path - - @property - def msm(self): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns None - """ - # unused but need to keep api backwards compatible - # log a warning and move on - LOG.warning("msm has been deprecated\n" - "DO NOT use self.msm property") - return None - - @property - def default_skill_names(self) -> tuple: - """Property representing the default skills expected to be installed""" - LOG.warning("msm has been deprecated\n" - "skill install/update is no longer handled by ovos-core") - return () - - def update_skills(self, quick=False): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns True - """ - LOG.warning("msm has been deprecated\n" - "skill install/update is no longer handled by ovos-core") - return True - - def handle_not_connected(self): - """"DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning - """ - LOG.warning("msm has been deprecated\n" - "no update will be scheduled") - - def post_manifest(self, reload_skills_manifest=False): - """Post the manifest of the device's skills to the backend.""" - from mycroft.skills.skill_updater import SeleneSkillManifestUploader - uploader = SeleneSkillManifestUploader() - uploader.post_manifest(reload_skills_manifest) - - def install_or_update(self, skill): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning - """ - LOG.warning("msm has been deprecated\n" - f"{skill} will not be changed") - - def defaults_installed(self): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns True - """ - LOG.warning("msm has been deprecated\n" - "skill install/update is no longer handled by ovos-core") - return True diff --git a/mycroft/deprecated/speech_client.py b/mycroft/deprecated/speech_client.py deleted file mode 100644 index 9f2969726f24..000000000000 --- a/mycroft/deprecated/speech_client.py +++ /dev/null @@ -1,238 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -""" -NOTE: this is dead code! do not use! -This file is only present to ensure backwards compatibility -in case someone is importing from here -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" - -from ovos_utils.log import LOG -from speech_recognition import AudioData - - -class RollingMean: - """Simple rolling mean calculation optimized for speed. - - The optimization is made for cases where value retrieval is made at a - comparative rate to the sample additions. - - Args: - mean_samples: Number of samples to use for mean value - """ - - def __init__(self, mean_samples): - self.num_samples = mean_samples - self.samples = [] - self.value = None # Leave unintialized - self.replace_pos = 0 # Position to replace - - def append_sample(self, sample): - """Add a sample to the buffer. - - The sample will be appended if there is room in the buffer, - otherwise it will replace the oldest sample in the buffer. - """ - sample = float(sample) - current_len = len(self.samples) - if current_len < self.num_samples: - # build the mean - self.samples.append(sample) - if self.value is not None: - avgsum = self.value * current_len + sample - self.value = avgsum / (current_len + 1) - else: # If no samples are in the buffer set the sample as mean - self.value = sample - else: - # Remove the contribution of the old sample - replace_val = self.samples[self.replace_pos] - self.value -= replace_val / self.num_samples - - # Replace it with the new sample and update the mean with it's - # contribution - self.value += sample / self.num_samples - self.samples[self.replace_pos] = sample - - # Update replace position - self.replace_pos = (self.replace_pos + 1) % self.num_samples - - -class WordExtractor: - SILENCE_SECS = 0.1 - PRECISION_RATE = 0.01 - - def __init__(self, audio, recognizer, metrics): - self.audio = audio - self.recognizer = recognizer - self.audio_size = len(self.audio.frame_data) - self.delta = int(self.audio_size / 2) - self.begin = 0 - self.end = self.audio_size - self.precision = int(self.audio_size * self.PRECISION_RATE) - self.silence_data = self.create_silence(self.SILENCE_SECS, - self.audio.sample_rate, - self.audio.sample_width) - self.metrics = metrics - - def __add(self, is_begin, value): - if is_begin: - self.begin += value - else: - self.end += value - - def __calculate_marker(self, is_begin): - dt = self.delta - sign = 1 if is_begin else -1 - - while dt > self.precision: - self.__add(is_begin, dt * sign) - segment = self.audio.frame_data[self.begin:self.end] - found = self.recognizer.is_recognized(segment, self.metrics) - if not found: - self.__add(is_begin, dt * -sign) - dt = int(dt / 2) - - def calculate_range(self): - self.__calculate_marker(False) - self.__calculate_marker(True) - - @staticmethod - def create_silence(seconds, sample_rate, sample_width): - return '\0' * int(seconds * sample_rate * sample_width) - - def get_audio_data_before(self): - byte_data = self.audio.frame_data[0:self.begin] + self.silence_data - return AudioData(byte_data, self.audio.sample_rate, - self.audio.sample_width) - - def get_audio_data_after(self): - byte_data = self.silence_data + self.audio.frame_data[self.end: - self.audio_size] - return AudioData(byte_data, self.audio.sample_rate, - self.audio.sample_width) - - -class NoiseTracker: - """DEPRECATED! use SilenceDetector instead, only provided for backwards compatibility imports - - Noise tracker, used to deterimine if an audio utterance is complete. - - The current implementation expects a number of loud chunks (not necessary - in one continous sequence) followed by a short period of continous quiet - audio data to be considered complete. - - Args: - minimum (int): lower noise level will be threshold for "quiet" level - maximum (int): ceiling of noise level - sec_per_buffer (float): the length of each buffer used when updating - the tracker - loud_time_limit (float): time in seconds of low noise to be considered - a complete sentence - silence_time_limit (float): time limit for silence to abort sentence - silence_after_loud (float): time of silence to finalize the sentence. - default 0.25 seconds. - """ - - def __init__(self, minimum, maximum, sec_per_buffer, loud_time_limit, - silence_time_limit, silence_after_loud_time=0.25): - self.min_level = minimum - self.max_level = maximum - self.sec_per_buffer = sec_per_buffer - - self.num_loud_chunks = 0 - self.level = 0 - - # Smallest number of loud chunks required to return loud enough - self.min_loud_chunks = int(loud_time_limit / sec_per_buffer) - - self.max_silence_duration = silence_time_limit - self.silence_duration = 0 - - # time of quite period after long enough loud data to consider the - # sentence complete - self.silence_after_loud = silence_after_loud_time - - # Constants - self.increase_multiplier = 200 - self.decrease_multiplier = 100 - - def _increase_noise(self): - """Bumps the current level. - - Modifies the noise level with a factor depending in the buffer length. - """ - if self.level < self.max_level: - self.level += self.increase_multiplier * self.sec_per_buffer - - def _decrease_noise(self): - """Decrease the current level. - - Modifies the noise level with a factor depending in the buffer length. - """ - if self.level > self.min_level: - self.level -= self.decrease_multiplier * self.sec_per_buffer - - def update(self, is_loud): - """Update the tracking. with either a loud chunk or a quiet chunk. - - Args: - is_loud: True if a loud chunk should be registered - False if a quiet chunk should be registered - """ - if is_loud: - self._increase_noise() - self.num_loud_chunks += 1 - else: - self._decrease_noise() - # Update duration of energy under the threshold level - if self._quiet_enough(): - self.silence_duration += self.sec_per_buffer - else: # Reset silence duration - self.silence_duration = 0 - - def _loud_enough(self): - """Check if the noise loudness criteria is fulfilled. - - The noise is considered loud enough if it's been over the threshold - for a certain number of chunks (accumulated, not in a row). - """ - return self.num_loud_chunks > self.min_loud_chunks - - def _quiet_enough(self): - """Check if the noise quietness criteria is fulfilled. - - The quiet level is instant and will return True if the level is lower - or equal to the minimum noise level. - """ - return self.level <= self.min_level - - def recording_complete(self): - """Has the end creteria for the recording been met. - - If the noise level has decresed from a loud level to a low level - the user has stopped speaking. - - Alternatively if a lot of silence was recorded without detecting - a loud enough phrase. - """ - too_much_silence = (self.silence_duration > self.max_silence_duration) - if too_much_silence: - LOG.debug('Too much silence recorded without start of sentence ' - 'detected') - return ((self._quiet_enough() and - self.silence_duration > self.silence_after_loud) and - (self._loud_enough() or too_much_silence)) diff --git a/mycroft/deprecated/stt.py b/mycroft/deprecated/stt.py deleted file mode 100644 index 48222750508e..000000000000 --- a/mycroft/deprecated/stt.py +++ /dev/null @@ -1,8 +0,0 @@ -# TODO add missing plugins! -from ovos_listener.stt import STTFactory -from ovos_plugin_manager.templates.stt import STT, TokenSTT, GoogleJsonSTT, \ - StreamingSTT, StreamThread, BasicSTT, KeySTT - -# for compat in case its being imported elsewhere -from ovos_stt_plugin_selene import SeleneSTT as MycroftSTT - diff --git a/mycroft/deprecated/text/__init__.py b/mycroft/deprecated/text/__init__.py deleted file mode 100644 index c9268852d7eb..000000000000 --- a/mycroft/deprecated/text/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/mycroft/deprecated/text/gui_server.py b/mycroft/deprecated/text/gui_server.py deleted file mode 100644 index 8f4357933291..000000000000 --- a/mycroft/deprecated/text/gui_server.py +++ /dev/null @@ -1 +0,0 @@ -from ovos_cli_client.gui_server import * diff --git a/mycroft/deprecated/text/text_client.py b/mycroft/deprecated/text/text_client.py deleted file mode 100644 index 58c5c5faf7d5..000000000000 --- a/mycroft/deprecated/text/text_client.py +++ /dev/null @@ -1 +0,0 @@ -from ovos_cli_client.text_client import * diff --git a/mycroft/dialog/__init__.py b/mycroft/dialog/__init__.py deleted file mode 100644 index 79b7615321b1..000000000000 --- a/mycroft/dialog/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Provides utilities for rendering dialogs and populating with custom data.""" - -from mycroft.dialog.dialog import (MustacheDialogRenderer, load_dialogs, get) diff --git a/mycroft/dialog/dialog.py b/mycroft/dialog/dialog.py deleted file mode 100644 index 0599a3ab616c..000000000000 --- a/mycroft/dialog/dialog.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" -Provides utilities for reading dialog files and rendering dialogs populated -with custom data. -""" -from ovos_utils.dialog import MustacheDialogRenderer, load_dialogs, get_dialog - - -def get(phrase, lang=None, context=None): - """Looks up a resource file for the given phrase. - - If no file is found, the requested phrase is returned as the string. This - will use the default language for translations. - - Args: - phrase (str): resource phrase to retrieve/translate - lang (str): the language to use - context (dict): values to be inserted into the string - - Returns: - str: a randomized and/or translated version of the phrase - """ - if not lang: - from ovos_config.config import Configuration - lang = Configuration().get('lang', "en-us") - return get_dialog(phrase, lang, context) diff --git a/mycroft/enclosure/__init__.py b/mycroft/enclosure/__init__.py deleted file mode 100644 index b6747eeabbc5..000000000000 --- a/mycroft/enclosure/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -""" -from mycroft.enclosure.api import EnclosureAPI diff --git a/mycroft/enclosure/api.py b/mycroft/enclosure/api.py deleted file mode 100644 index c6c0ca76ef11..000000000000 --- a/mycroft/enclosure/api.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -""" -from ovos_bus_client.apis.enclosure import EnclosureAPI as _EAPI -from mycroft.enclosure.display_manager import DisplayManager - - -class EnclosureAPI(_EAPI): - def __init__(self, bus, name=""): - super().__init__(bus, name) - self.display_manager = DisplayManager(self.skill_id) diff --git a/mycroft/enclosure/display_manager.py b/mycroft/enclosure/display_manager.py deleted file mode 100644 index 6c7939110d18..000000000000 --- a/mycroft/enclosure/display_manager.py +++ /dev/null @@ -1,203 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - - -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -TODO: consider importing from PHAL -""" - -""" DisplayManager - -This module provides basic "state" for the visual representation associated -with this Mycroft instance. The current states are: - ActiveSkill - The skill that last interacted with the display via the - Enclosure API. - -Currently, a wakeword sets the ActiveSkill to "wakeword", which will auto -clear after 10 seconds. - -A skill is set to Active when it matches an intent, outputs audio, or -changes the display via the EnclosureAPI() - -A skill is automatically cleared from Active two seconds after audio -output is spoken, or 2 seconds after resetting the display. - -So it is common to have '' as the active skill. -""" - -import json -from threading import Thread, Timer - -import os - -from ovos_bus_client.client import MessageBusClient -from ovos_utils.signal import get_ipc_directory -from ovos_utils.log import LOG - - -def _write_data(dictionary): - """ Writes the dictionary of state data to the IPC directory. - - Args: - dictionary (dict): information to place in the 'disp_info' file - """ - - managerIPCDir = os.path.join(get_ipc_directory(), "managers") - # change read/write permissions based on if file exists or not - path = os.path.join(managerIPCDir, "disp_info") - permission = "r+" if os.path.isfile(path) else "w+" - - if permission == "w+" and os.path.isdir(managerIPCDir) is False: - os.makedirs(managerIPCDir) - os.chmod(managerIPCDir, 0o777) - - try: - with open(path, permission) as dispFile: - - # check if file is empty - if os.stat(str(dispFile.name)).st_size != 0: - data = json.load(dispFile) - - else: - data = {} - LOG.info("Display Manager is creating " + dispFile.name) - - for key in dictionary: - data[key] = dictionary[key] - - dispFile.seek(0) - dispFile.write(json.dumps(data)) - dispFile.truncate() - - os.chmod(path, 0o777) - - except Exception as e: - LOG.error(e) - LOG.error("Error found in display manager file, deleting...") - os.remove(path) - _write_data(dictionary) - - -def _read_data(): - """ Writes the dictionary of state data from the IPC directory. - Returns: - dict: loaded state information - """ - managerIPCDir = os.path.join(get_ipc_directory(), "managers") - - path = os.path.join(managerIPCDir, "disp_info") - permission = "r" if os.path.isfile(path) else "w+" - - if permission == "w+" and os.path.isdir(managerIPCDir) is False: - os.makedirs(managerIPCDir) - - data = {} - try: - with open(path, permission) as dispFile: - - if os.stat(str(dispFile.name)).st_size != 0: - data = json.load(dispFile) - - except Exception as e: - LOG.error(e) - os.remove(path) - _read_data() - - return data - - -class DisplayManager: - """ The Display manager handles the basic state of the display, - be it a mark-1 or a mark-2 or even a future Mark-3. - """ - - def __init__(self, name=None): - self.name = name or "" - - def set_active(self, skill_name=None): - """ Sets skill name as active in the display Manager - Args: - string: skill_name - """ - name = skill_name if skill_name is not None else self.name - _write_data({"active_skill": name}) - - def get_active(self): - """ Get the currenlty active skill from the display manager - Returns: - string: The active skill's name - """ - data = _read_data() - active_skill = "" - - if "active_skill" in data: - active_skill = data["active_skill"] - - return active_skill - - def remove_active(self): - """ Clears the active skill """ - LOG.debug("Removing active skill...") - _write_data({"active_skill": ""}) - - -def init_display_manager_bus_connection(): - """ Connects the display manager to the messagebus """ - LOG.info("Connecting display manager to messagebus") - - # Should remove needs to be an object so it can be referenced in functions - # [https://stackoverflow.com/questions/986006/how-do-i-pass-a-variable-by-reference] - display_manager = DisplayManager() - should_remove = [True] - - def check_flag(flag): - if flag[0] is True: - display_manager.remove_active() - - def set_delay(event=None): - should_remove[0] = True - Timer(2, check_flag, [should_remove]).start() - - def set_remove_flag(event=None): - should_remove[0] = False - - def connect(): - bus.run_forever() - - def remove_wake_word(): - data = _read_data() - if "active_skill" in data and data["active_skill"] == "wakeword": - display_manager.remove_active() - - def set_wakeword_skill(event=None): - display_manager.set_active("wakeword") - Timer(10, remove_wake_word).start() - - bus = MessageBusClient() - bus.on('recognizer_loop:audio_output_end', set_delay) - bus.on('recognizer_loop:audio_output_start', set_remove_flag) - bus.on('recognizer_loop:record_begin', set_wakeword_skill) - - event_thread = Thread(target=connect) - event_thread.setDaemon(True) - event_thread.start() diff --git a/mycroft/enclosure/gui.py b/mycroft/enclosure/gui.py deleted file mode 100644 index 74f167495e12..000000000000 --- a/mycroft/enclosure/gui.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! - -This file is only present to ensure backwards compatibility -in case someone is importing from here - -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core - -""" -from ovos_workshop.skills.ovos import SkillGUI diff --git a/mycroft/filesystem/__init__.py b/mycroft/filesystem/__init__.py deleted file mode 100644 index ea8855bf7ba2..000000000000 --- a/mycroft/filesystem/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat imports, do not delete! -from ovos_workshop.filesystem import FileSystemAccess diff --git a/mycroft/gui/__init__.py b/mycroft/gui/__init__.py deleted file mode 100644 index d73250046c60..000000000000 --- a/mycroft/gui/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat imports -from ovos_bus_client.apis.gui import GUIInterface -from ovos_workshop.skills.ovos import SkillGUI diff --git a/mycroft/gui/__main__.py b/mycroft/gui/__main__.py deleted file mode 100644 index 8f41675d7e73..000000000000 --- a/mycroft/gui/__main__.py +++ /dev/null @@ -1,38 +0,0 @@ -from ovos_config.locale import setup_locale -from ovos_gui.service import GUIService - -from ovos_utils import wait_for_exit_signal -from ovos_utils.process_utils import reset_sigint_handler -from ovos_utils.log import LOG, init_service_logger - - -def on_ready(): - LOG.info("GUI websocket started!") - - -def on_stopping(): - LOG.info('GUI websocket is shutting down...') - - -def on_error(e='Unknown'): - LOG.error(f'GUI websocket failed: {repr(e)}') - - -def main(ready_hook=on_ready, error_hook=on_error, stopping_hook=on_stopping): - init_service_logger("gui") - LOG.debug("GUI websocket created") - try: - reset_sigint_handler() - setup_locale() - service = GUIService() - service.run() - ready_hook() - wait_for_exit_signal() - service.stop() - stopping_hook() - except Exception as e: - error_hook(e) - - -if __name__ == "__main__": - main() diff --git a/mycroft/gui/bus.py b/mycroft/gui/bus.py deleted file mode 100644 index a0945c8ffb67..000000000000 --- a/mycroft/gui/bus.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat import -from ovos_gui.bus import GUIWebsocketHandler, determine_if_gui_connected, \ - send_message_to_gui, create_gui_service, get_gui_websocket_config \ No newline at end of file diff --git a/mycroft/gui/extensions.py b/mycroft/gui/extensions.py deleted file mode 100644 index 547424944fa1..000000000000 --- a/mycroft/gui/extensions.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat import -from ovos_gui.extensions import ExtensionsManager \ No newline at end of file diff --git a/mycroft/gui/homescreen.py b/mycroft/gui/homescreen.py deleted file mode 100644 index 9f1a7f829174..000000000000 --- a/mycroft/gui/homescreen.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat import -from ovos_gui.homescreen import HomescreenManager diff --git a/mycroft/gui/interfaces/mobile.py b/mycroft/gui/interfaces/mobile.py deleted file mode 100644 index fcd837801530..000000000000 --- a/mycroft/gui/interfaces/mobile.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat imports -from ovos_gui.interfaces.mobile import MobileExtensionGuiInterface diff --git a/mycroft/gui/interfaces/smartspeaker.py b/mycroft/gui/interfaces/smartspeaker.py deleted file mode 100644 index 8bc5597fd3d0..000000000000 --- a/mycroft/gui/interfaces/smartspeaker.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat imports -from ovos_gui.interfaces.smartspeaker import SmartSpeakerExtensionGuiInterface - diff --git a/mycroft/gui/namespace.py b/mycroft/gui/namespace.py deleted file mode 100644 index 37b0371165cb..000000000000 --- a/mycroft/gui/namespace.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat import -from ovos_gui.namespace import Namespace, NamespaceManager, namespace_lock, RESERVED_KEYS diff --git a/mycroft/gui/page.py b/mycroft/gui/page.py deleted file mode 100644 index b4b2c25ba181..000000000000 --- a/mycroft/gui/page.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat import -from ovos_gui.page import GuiPage \ No newline at end of file diff --git a/mycroft/gui/service.py b/mycroft/gui/service.py deleted file mode 100644 index d33772bd3142..000000000000 --- a/mycroft/gui/service.py +++ /dev/null @@ -1,5 +0,0 @@ -# backwards compat imports -from ovos_gui.namespace import NamespaceManager -from ovos_gui.extensions import ExtensionsManager -from ovos_gui.service import GUIService, on_started, on_alive, on_ready, on_error, on_stopping - diff --git a/mycroft/identity/__init__.py b/mycroft/identity/__init__.py deleted file mode 100644 index e232224fb2fc..000000000000 --- a/mycroft/identity/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat import, moved to ovos_backend_client package -from ovos_backend_client.identity import DeviceIdentity, IdentityManager, identity_lock diff --git a/mycroft/listener/__init__.py b/mycroft/listener/__init__.py deleted file mode 100644 index 429698c37ea7..000000000000 --- a/mycroft/listener/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat imports -from ovos_listener.listener import MAX_MIC_RESTARTS,AUDIO_DATA,STREAM_START , STREAM_DATA, STREAM_STOP, \ - AudioStreamHandler, AudioProducer, AudioConsumer, RecognizerLoop, RecognizerLoopState, recognizer_conf_hash diff --git a/mycroft/listener/__main__.py b/mycroft/listener/__main__.py deleted file mode 100644 index 13f57b16b1a1..000000000000 --- a/mycroft/listener/__main__.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from ovos_listener.service import SpeechService, on_error, on_stopping, on_ready -from ovos_config.locale import setup_locale -from ovos_utils.log import init_service_logger -from ovos_utils.process_utils import reset_sigint_handler, PIDLock -from ovos_utils import wait_for_exit_signal - - -def main(ready_hook=on_ready, error_hook=on_error, stopping_hook=on_stopping, - watchdog=lambda: None): - init_service_logger("voice") - reset_sigint_handler() - PIDLock("voice") - setup_locale() - service = SpeechService(on_ready=ready_hook, - on_error=error_hook, - on_stopping=stopping_hook, - watchdog=watchdog) - service.daemon = True - service.start() - wait_for_exit_signal() - - -if __name__ == "__main__": - main() diff --git a/mycroft/listener/data_structures.py b/mycroft/listener/data_structures.py deleted file mode 100644 index 260864a0f8f6..000000000000 --- a/mycroft/listener/data_structures.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat imports -from ovos_listener.data_structures import CyclicAudioBuffer -from mycroft.deprecated.speech_client import RollingMean diff --git a/mycroft/listener/hotword_factory.py b/mycroft/listener/hotword_factory.py deleted file mode 100644 index 40ed9b96c68f..000000000000 --- a/mycroft/listener/hotword_factory.py +++ /dev/null @@ -1,4 +0,0 @@ -# backwards compat imports -from ovos_listener.hotword_factory import HotWordFactory -from ovos_plugin_manager.wakewords import load_wake_word_plugin, find_wake_word_plugins -from ovos_plugin_manager.templates.hotwords import HotWordEngine \ No newline at end of file diff --git a/mycroft/listener/mic.py b/mycroft/listener/mic.py deleted file mode 100644 index 051aa91fb1b8..000000000000 --- a/mycroft/listener/mic.py +++ /dev/null @@ -1,11 +0,0 @@ -# backwards compat imports -from speech_recognition import ( - Microphone, - AudioSource, - AudioData -) -from mycroft.deprecated.speech_client import NoiseTracker, RollingMean -from ovos_listener.data_structures import CyclicAudioBuffer -from ovos_listener.silence import SilenceDetector, SilenceResultType, SilenceMethod -from ovos_listener.mic import WakeWordData, ListenerState, ListeningMode, MutableStream, \ - MutableMicrophone, ResponsiveRecognizer, get_silence diff --git a/mycroft/listener/service.py b/mycroft/listener/service.py deleted file mode 100644 index 8cff83897906..000000000000 --- a/mycroft/listener/service.py +++ /dev/null @@ -1,12 +0,0 @@ -# backwards compat imports -from ovos_listener.listener import RecognizerLoop -from ovos_listener.mic import ListenerState, ListeningMode -from ovos_listener.service import SpeechService, on_ready, on_stopping, on_error -from ovos_utils.log import LOG - - -class SpeechClient(SpeechService): - def __init__(self, *args, **kwargs): - LOG.warning("SpeechClient has been renamed to SpeechService, it will be removed in 0.1.0") - super().__init__(self, *args, **kwargs) - diff --git a/mycroft/listener/silence.py b/mycroft/listener/silence.py deleted file mode 100644 index 91617959d64c..000000000000 --- a/mycroft/listener/silence.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat imports -from ovos_listener.silence import SilenceMethod, SilenceResult, SilenceResultType, SilenceDetect \ No newline at end of file diff --git a/mycroft/listener/stt.py b/mycroft/listener/stt.py deleted file mode 100644 index e581a44349c9..000000000000 --- a/mycroft/listener/stt.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat imports -from ovos_listener.stt import STTFactory -from ovos_plugin_manager.stt import load_stt_plugin diff --git a/mycroft/lock/__init__.py b/mycroft/lock/__init__.py deleted file mode 100644 index 997746203306..000000000000 --- a/mycroft/lock/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat import -from ovos_utils.process_utils import Signal, PIDLock as Lock -Lock.init() diff --git a/mycroft/messagebus/__init__.py b/mycroft/messagebus/__init__.py deleted file mode 100644 index 9c6e62020532..000000000000 --- a/mycroft/messagebus/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -from ovos_bus_client.client import MessageBusClient -from ovos_bus_client.message import Message -from ovos_bus_client.send_func import send - -try: - from ovos_messagebus.event_handler import MessageBusEventHandler -except ImportError: - pass # do not require tornado installed, only needed to open websocket! diff --git a/mycroft/messagebus/client/__init__.py b/mycroft/messagebus/client/__init__.py deleted file mode 100644 index 5dbc1c6b59a6..000000000000 --- a/mycroft/messagebus/client/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -"""TODO: 21.08 simplify structure (move client.py up one level).""" -from ovos_bus_client.client import MessageBusClient -from ovos_bus_client.client import MessageWaiter diff --git a/mycroft/messagebus/client/client.py b/mycroft/messagebus/client/client.py deleted file mode 100644 index 1655765b3681..000000000000 --- a/mycroft/messagebus/client/client.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -from ovos_bus_client import MessageBusClient -from ovos_bus_client.client import MessageWaiter - -from ovos_bus_client.conf import load_message_bus_config -import mycroft.util.process_utils - - -def echo(): - message_bus_client = MessageBusClient() - - def repeat_utterance(message): - message.msg_type = 'speak' - message_bus_client.emit(message) - - message_bus_client.on('message', mycroft.util.process_utils.create_echo_function(None)) - message_bus_client.on('recognizer_loop:utterance', repeat_utterance) - message_bus_client.run_forever() - - -if __name__ == "__main__": - echo() diff --git a/mycroft/messagebus/load_config.py b/mycroft/messagebus/load_config.py deleted file mode 100644 index ad64a419631d..000000000000 --- a/mycroft/messagebus/load_config.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Message bus configuration loader. - -The message bus event handler and client use basically the same configuration. -This code is re-used in both to load config values. -""" -from ovos_bus_client.conf import MessageBusConfig, load_message_bus_config diff --git a/mycroft/messagebus/message.py b/mycroft/messagebus/message.py deleted file mode 100644 index 3469d7117f5a..000000000000 --- a/mycroft/messagebus/message.py +++ /dev/null @@ -1,13 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from ovos_bus_client.message import dig_for_message, Message diff --git a/mycroft/messagebus/send.py b/mycroft/messagebus/send.py deleted file mode 100644 index 4ee0cda70b6f..000000000000 --- a/mycroft/messagebus/send.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import sys -import json - -from ovos_bus_client.send_func import send - - -def main(): - """Main function, will run if executed from command line. - - Sends parameters from commandline. - - Param 1: message string - Param 2: data (json string) - """ - # Parse the command line - if len(sys.argv) == 2: - message_to_send = sys.argv[1] - data_to_send = {} - elif len(sys.argv) == 3: - message_to_send = sys.argv[1] - try: - data_to_send = json.loads(sys.argv[2]) - except BaseException: - print("Second argument must be a JSON string") - print("Ex: python -m mycroft.messagebus.send speak " - "'{\"utterance\" : \"hello\"}'") - exit() - else: - print("Command line interface to the mycroft-core messagebus.") - print("Usage: python -m mycroft.messagebus.send message") - print(" python -m mycroft.messagebus.send message JSON-string\n") - print("Examples: python -m mycroft.messagebus.send system.wifi.setup") - print("Ex: python -m mycroft.messagebus.send speak " - "'{\"utterance\" : \"hello\"}'") - exit() - - send(message_to_send, data_to_send) - - -if __name__ == '__main__': - try: - main() - except IOError: - print('Could not connect to websocket, no message sent') diff --git a/mycroft/messagebus/send_func.py b/mycroft/messagebus/send_func.py deleted file mode 100644 index a89c69de4766..000000000000 --- a/mycroft/messagebus/send_func.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from websocket import create_connection - -from ovos_config.config import Configuration -from ovos_bus_client.client import MessageBusClient -from ovos_bus_client.message import Message -from ovos_bus_client.send_func import send - - diff --git a/mycroft/messagebus/service/__init__.py b/mycroft/messagebus/service/__init__.py deleted file mode 100644 index c9268852d7eb..000000000000 --- a/mycroft/messagebus/service/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/mycroft/messagebus/service/__main__.py b/mycroft/messagebus/service/__main__.py deleted file mode 100644 index 302a7cf5d097..000000000000 --- a/mycroft/messagebus/service/__main__.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" Message bus service for mycroft-core - -The message bus facilitates inter-process communication between mycroft-core -processes. It implements a websocket server so can also be used by external -systems to integrate with the Mycroft system. -""" -from ovos_bus_client.conf import load_message_bus_config -from ovos_messagebus.event_handler import MessageBusEventHandler -from ovos_utils.process_utils import reset_sigint_handler -from ovos_utils import create_daemon, wait_for_exit_signal -from ovos_utils.log import LOG, init_service_logger -from tornado import web, ioloop - - -def on_ready(): - LOG.info('Message bus service started!') - - -def on_error(e='Unknown'): - LOG.info('Message bus failed to start ({})'.format(repr(e))) - - -def on_stopping(): - LOG.info('Message bus is shutting down...') - - -def main(ready_hook=on_ready, error_hook=on_error, stopping_hook=on_stopping): - init_service_logger("bus") - LOG.info('Starting message bus service...') - reset_sigint_handler() - config = load_message_bus_config() - routes = [(config.route, MessageBusEventHandler)] - application = web.Application(routes) - application.listen(config.port, config.host) - create_daemon(ioloop.IOLoop.instance().start) - ready_hook() - wait_for_exit_signal() - stopping_hook() - - -if __name__ == "__main__": - main() diff --git a/mycroft/messagebus/service/event_handler.py b/mycroft/messagebus/service/event_handler.py deleted file mode 100644 index 2dbc5d986357..000000000000 --- a/mycroft/messagebus/service/event_handler.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat import -from ovos_messagebus.event_handler import MessageBusEventHandler, client_connections \ No newline at end of file diff --git a/mycroft/metrics/__init__.py b/mycroft/metrics/__init__.py deleted file mode 100644 index 38a1d03a5ded..000000000000 --- a/mycroft/metrics/__init__.py +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import json -from queue import Queue, Empty -import threading -import time - -import requests - -from ovos_backend_client.api import MetricsApi -from ovos_config.config import Configuration -from ovos_bus_client.session import SessionManager -from ovos_utils.log import LOG -from ovos_core.version import OVOS_VERSION_STR -from copy import copy -# backwards compat import -from ovos_utils.metrics import Stopwatch - - -class _MetricSender(threading.Thread): - """Thread responsible for sending metrics data.""" - - def __init__(self): - super().__init__() - self.queue = Queue() - self.daemon = True - self.start() - - def run(self): - while True: - time.sleep(30) - - try: - while True: # Try read the queue until it fails - report_metric(*self.queue.get_nowait()) - time.sleep(0.5) - except Empty: - pass # If the queue is empty just continue the loop - except Exception as e: - LOG.error('Could not send Metrics: {}'.format(repr(e))) - - -_metric_uploader = _MetricSender() - - -def report_metric(name, data): - """ - Report a general metric to the Mycroft servers - - Args: - name (str): Name of metric. Must use only letters and hyphens - data (dict): JSON dictionary to report. Must be valid JSON - """ - try: - if Configuration().get('opt_in', False): - MetricsApi().report_metric(name, data) - except Exception as e: - LOG.error(f'Metric couldn\'t be uploaded, due to a network error ({e})') - - -def report_timing(ident, system, timing, additional_data=None): - """Create standardized message for reporting timing. - - Args: - ident (str): identifier of user interaction - system (str): system the that's generated the report - timing (stopwatch): Stopwatch object with recorded timing - additional_data (dict): dictionary with related data - """ - additional_data = additional_data or {} - report = copy(additional_data) - report['id'] = ident - report['system'] = system - report['start_time'] = timing.timestamp - report['time'] = timing.time - - _metric_uploader.queue.put(('timing', report)) - - -class MetricsAggregator: - """ - MetricsAggregator is not threadsafe, and multiple clients writing the - same metric "concurrently" may result in data loss. - """ - - def __init__(self): - self._counters = {} - self._timers = {} - self._levels = {} - self._attributes = {} - self.attr("version", OVOS_VERSION_STR) - - def increment(self, name, value=1): - cur = self._counters.get(name, 0) - self._counters[name] = cur + value - - def timer(self, name, value): - cur = self._timers.get(name) - if not cur: - self._timers[name] = [] - cur = self._timers[name] = [] - cur.append(value) - - def level(self, name, value): - self._levels[name] = value - - def clear(self): - self._counters = {} - self._timers = {} - self._levels = {} - self._attributes = {} - self.attr("version", OVOS_VERSION_STR) - - def attr(self, name, value): - self._attributes[name] = value - - def flush(self): - publisher = MetricsPublisher() - payload = { - 'counters': self._counters, - 'timers': self._timers, - 'levels': self._levels, - 'attributes': self._attributes - } - self.clear() - count = (len(payload['counters']) + len(payload['timers']) + - len(payload['levels'])) - if count > 0: - # LOG.debug(json.dumps(payload)) - - def publish(): - publisher.publish(payload) - - threading.Thread(target=publish).start() - - -class MetricsPublisher: - def __init__(self, url=None, enabled=False): - conf = Configuration().get('server') or {} - self.url = url or conf.get('url') - self.enabled = enabled or conf.get('metrics', False) - - def publish(self, events): - if 'session_id' not in events: - session_id = SessionManager.get().session_id - events['session_id'] = session_id - if self.enabled: - requests.post( - self.url, - headers={'Content-Type': 'application/json'}, - data=json.dumps(events), verify=False) diff --git a/mycroft/res/snd/acknowledge.mp3 b/mycroft/res/snd/acknowledge.mp3 deleted file mode 100644 index efb06b497517..000000000000 Binary files a/mycroft/res/snd/acknowledge.mp3 and /dev/null differ diff --git a/mycroft/res/snd/clicked.wav b/mycroft/res/snd/clicked.wav deleted file mode 100644 index 91b55f6214c5..000000000000 Binary files a/mycroft/res/snd/clicked.wav and /dev/null differ diff --git a/mycroft/res/snd/error.mp3 b/mycroft/res/snd/error.mp3 deleted file mode 100644 index c6404ce6139c..000000000000 Binary files a/mycroft/res/snd/error.mp3 and /dev/null differ diff --git a/mycroft/res/snd/start_listening.wav b/mycroft/res/snd/start_listening.wav deleted file mode 100644 index c3202189162c..000000000000 Binary files a/mycroft/res/snd/start_listening.wav and /dev/null differ diff --git a/mycroft/res/text/az-az/and.word b/mycroft/res/text/az-az/and.word deleted file mode 100644 index 66928ff8a285..000000000000 --- a/mycroft/res/text/az-az/and.word +++ /dev/null @@ -1 +0,0 @@ -və \ No newline at end of file diff --git a/mycroft/res/text/az-az/backend.down.dialog b/mycroft/res/text/az-az/backend.down.dialog deleted file mode 100644 index 733eef169da0..000000000000 --- a/mycroft/res/text/az-az/backend.down.dialog +++ /dev/null @@ -1 +0,0 @@ -Deyəsən, Mycroft serverlərinə qoşula bilmirəm. Zəhmət olmasa mənimlə danışmazdan əvvəl bir neçə dəqiqə gözləyin. \ No newline at end of file diff --git a/mycroft/res/text/az-az/cancel.voc b/mycroft/res/text/az-az/cancel.voc deleted file mode 100644 index e09195544aac..000000000000 --- a/mycroft/res/text/az-az/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -ləğv et -ötür -bürax \ No newline at end of file diff --git a/mycroft/res/text/az-az/checking for updates.dialog b/mycroft/res/text/az-az/checking for updates.dialog deleted file mode 100644 index 3122ec072fcf..000000000000 --- a/mycroft/res/text/az-az/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Yeniləmələr yoxlanılır -Bir an gözləyin, özümü yeniləyirəm. diff --git a/mycroft/res/text/az-az/day.word b/mycroft/res/text/az-az/day.word deleted file mode 100644 index e202db16a43e..000000000000 --- a/mycroft/res/text/az-az/day.word +++ /dev/null @@ -1 +0,0 @@ -gün \ No newline at end of file diff --git a/mycroft/res/text/az-az/hour.word b/mycroft/res/text/az-az/hour.word deleted file mode 100644 index a1073d72644e..000000000000 --- a/mycroft/res/text/az-az/hour.word +++ /dev/null @@ -1 +0,0 @@ -saat \ No newline at end of file diff --git a/mycroft/res/text/az-az/i didn't catch that.dialog b/mycroft/res/text/az-az/i didn't catch that.dialog deleted file mode 100644 index 05f1bcb6250a..000000000000 --- a/mycroft/res/text/az-az/i didn't catch that.dialog +++ /dev/null @@ -1,3 +0,0 @@ -Bağışlayın, mən bunu başa düşmədim -bir daha deyə bilərsinizmi? -lütfən tekrar söyləyə bilərsinizmi? \ No newline at end of file diff --git a/mycroft/res/text/az-az/last.voc b/mycroft/res/text/az-az/last.voc deleted file mode 100644 index 395866874e20..000000000000 --- a/mycroft/res/text/az-az/last.voc +++ /dev/null @@ -1,2 +0,0 @@ -son seçim -sonuncu \ No newline at end of file diff --git a/mycroft/res/text/az-az/message_loading.skills.dialog b/mycroft/res/text/az-az/message_loading.skills.dialog deleted file mode 100644 index 96117b9df296..000000000000 --- a/mycroft/res/text/az-az/message_loading.skills.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < YÜKLƏNİR < < < \ No newline at end of file diff --git a/mycroft/res/text/az-az/message_rebooting.dialog b/mycroft/res/text/az-az/message_rebooting.dialog deleted file mode 100644 index 9b32a396dd21..000000000000 --- a/mycroft/res/text/az-az/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -YENİDƏN İŞƏ SALINIR... \ No newline at end of file diff --git a/mycroft/res/text/az-az/message_synching.clock.dialog b/mycroft/res/text/az-az/message_synching.clock.dialog deleted file mode 100644 index 8aeb858b47a4..000000000000 --- a/mycroft/res/text/az-az/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNC < < < \ No newline at end of file diff --git a/mycroft/res/text/az-az/message_updating.dialog b/mycroft/res/text/az-az/message_updating.dialog deleted file mode 100644 index 8a8503c7ebc4..000000000000 --- a/mycroft/res/text/az-az/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < YENİLƏNİR < < < \ No newline at end of file diff --git a/mycroft/res/text/az-az/minute.word b/mycroft/res/text/az-az/minute.word deleted file mode 100644 index d6040db0ae5b..000000000000 --- a/mycroft/res/text/az-az/minute.word +++ /dev/null @@ -1 +0,0 @@ -dəqiqə \ No newline at end of file diff --git a/mycroft/res/text/az-az/mycroft.intro.dialog b/mycroft/res/text/az-az/mycroft.intro.dialog deleted file mode 100644 index f27e2a1272e4..000000000000 --- a/mycroft/res/text/az-az/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Salam, mən Mycroft, sizin yeni yardımcınızam. Sizə yardım etmək üçün mən internetə qoşulmalıyam. Siz ya məni şəbəkə kabeli ilə qoşa, ya da Wi-Fi istifadə edə bilərsiniz. WiFi qurmaq üçün bu təlimatları yerinə yetirin: \ No newline at end of file diff --git a/mycroft/res/text/az-az/no.voc b/mycroft/res/text/az-az/no.voc deleted file mode 100644 index 2f8f07703255..000000000000 --- a/mycroft/res/text/az-az/no.voc +++ /dev/null @@ -1,3 +0,0 @@ -yox -yo -mənfi \ No newline at end of file diff --git a/mycroft/res/text/az-az/not connected to the internet.dialog b/mycroft/res/text/az-az/not connected to the internet.dialog deleted file mode 100644 index 72dabd34acc4..000000000000 --- a/mycroft/res/text/az-az/not connected to the internet.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Deyəsən, mən İnternetə qoşulmamışam, lütfən, şəbəkə bağlantınızı yoxlayın. -Mən internetə bağlı deyiləm, lütfən, şəbəkə bağlantınızı yoxlayın. -indi internetə qoşula bilmirəm, lütfən, şəbəkə bağlantınızı yoxlayınş -İnternetə qoşula bilmirəm, şəbəkə bağlantınızı yoxlayın. \ No newline at end of file diff --git a/mycroft/res/text/az-az/not.loaded.dialog b/mycroft/res/text/az-az/not.loaded.dialog deleted file mode 100644 index d6e4393357a9..000000000000 --- a/mycroft/res/text/az-az/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Yükləməni bitirənə kimi bir az gözləyin. \ No newline at end of file diff --git a/mycroft/res/text/az-az/or.word b/mycroft/res/text/az-az/or.word deleted file mode 100644 index 0bc20c09130b..000000000000 --- a/mycroft/res/text/az-az/or.word +++ /dev/null @@ -1 +0,0 @@ -ya \ No newline at end of file diff --git a/mycroft/res/text/az-az/phonetic_spellings.txt b/mycroft/res/text/az-az/phonetic_spellings.txt deleted file mode 100644 index d4886ad1793b..000000000000 --- a/mycroft/res/text/az-az/phonetic_spellings.txt +++ /dev/null @@ -1,3 +0,0 @@ -ai: S.İ. -mycroftai: maykraft S.İ. -spotify: spatifay diff --git a/mycroft/res/text/az-az/reset to factory defaults.dialog b/mycroft/res/text/az-az/reset to factory defaults.dialog deleted file mode 100644 index 7bb1e7179306..000000000000 --- a/mycroft/res/text/az-az/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Mən fabrik tənzimlərimə qayıtmışam. \ No newline at end of file diff --git a/mycroft/res/text/az-az/second.word b/mycroft/res/text/az-az/second.word deleted file mode 100644 index 8badec1e7371..000000000000 --- a/mycroft/res/text/az-az/second.word +++ /dev/null @@ -1 +0,0 @@ -saniyə \ No newline at end of file diff --git a/mycroft/res/text/az-az/skill.error.dialog b/mycroft/res/text/az-az/skill.error.dialog deleted file mode 100644 index 5bffd065d693..000000000000 --- a/mycroft/res/text/az-az/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -{{skill}} Bacarıqlar işlərkən xəta baş verdi \ No newline at end of file diff --git a/mycroft/res/text/az-az/skills updated.dialog b/mycroft/res/text/az-az/skills updated.dialog deleted file mode 100644 index 01e31812f5b0..000000000000 --- a/mycroft/res/text/az-az/skills updated.dialog +++ /dev/null @@ -1 +0,0 @@ -Bacarıqlar Yeniləndi. Mən sizə yardım etməyə hazıram. \ No newline at end of file diff --git a/mycroft/res/text/az-az/sorry I couldn't install default skills.dialog b/mycroft/res/text/az-az/sorry I couldn't install default skills.dialog deleted file mode 100644 index 034137869451..000000000000 --- a/mycroft/res/text/az-az/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -bacarıqları yeniləyərkən xəta baş verdi \ No newline at end of file diff --git a/mycroft/res/text/az-az/time.changed.reboot.dialog b/mycroft/res/text/az-az/time.changed.reboot.dialog deleted file mode 100644 index dc8ecd5c1bcf..000000000000 --- a/mycroft/res/text/az-az/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Saatımı internetlə sinxronlaşdırdıqdan sonra yenidən başlamalıyam, birazajan qayıdacağam. \ No newline at end of file diff --git a/mycroft/res/text/az-az/yes.voc b/mycroft/res/text/az-az/yes.voc deleted file mode 100644 index 81b178542332..000000000000 --- a/mycroft/res/text/az-az/yes.voc +++ /dev/null @@ -1,4 +0,0 @@ -bəli -evet -hən -lütfən diff --git a/mycroft/res/text/ca-es/backend.down.dialog b/mycroft/res/text/ca-es/backend.down.dialog deleted file mode 100644 index 864977b267cf..000000000000 --- a/mycroft/res/text/ca-es/backend.down.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Tinc problemes per comunicar-me amb els servidors de Mycroft. Dóna'm uns minuts abans d'intentar parlar amb mi. -Tinc problemes per comunicar-me amb els servidors de Mycroft. Espereu uns minuts abans d'intentar parlar amb mi. -Sembla que no puc connectar-me als servidors de Mycroft. Dóna'm uns minuts abans d'intentar parlar amb mi. -Sembla que no puc connectar-me als servidors de Mycroft. Espereu uns minuts abans d'intentar parlar amb mi. \ No newline at end of file diff --git a/mycroft/res/text/ca-es/cancel.voc b/mycroft/res/text/ca-es/cancel.voc deleted file mode 100644 index ba5c39ffd45e..000000000000 --- a/mycroft/res/text/ca-es/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -cancel·la -no importa -oblida-ho \ No newline at end of file diff --git a/mycroft/res/text/ca-es/checking for updates.dialog b/mycroft/res/text/ca-es/checking for updates.dialog deleted file mode 100644 index 6d4c1deeac6c..000000000000 --- a/mycroft/res/text/ca-es/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -S'està cercant actualitzacions -Un moment mentre m'actualitzo \ No newline at end of file diff --git a/mycroft/res/text/ca-es/common_play.voc b/mycroft/res/text/ca-es/common_play.voc deleted file mode 100644 index d52a63830507..000000000000 --- a/mycroft/res/text/ca-es/common_play.voc +++ /dev/null @@ -1,4 +0,0 @@ -posa -escoltar -escoltant -OCP diff --git a/mycroft/res/text/ca-es/i didn't catch that.dialog b/mycroft/res/text/ca-es/i didn't catch that.dialog deleted file mode 100644 index d8aa8bc0ff5b..000000000000 --- a/mycroft/res/text/ca-es/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Ho sento, però no t'entès -Perdona'm, però no t'entès -Pots tornar a dir-ho? -Pots tornar a repetir-ho? \ No newline at end of file diff --git a/mycroft/res/text/ca-es/last.voc b/mycroft/res/text/ca-es/last.voc deleted file mode 100644 index e04f9455faa2..000000000000 --- a/mycroft/res/text/ca-es/last.voc +++ /dev/null @@ -1,16 +0,0 @@ -últim -última -últims -últimes -ùltim -ùltima -ùltims -ùltimes -ultim -ultima -ultims -ultimes -darrer -darrera -darrers -darreres diff --git a/mycroft/res/text/ca-es/learning disabled.dialog b/mycroft/res/text/ca-es/learning disabled.dialog deleted file mode 100644 index 9893cd72775b..000000000000 --- a/mycroft/res/text/ca-es/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Les dades d'interacció ja no s'enviaran a Mycroft AI. \ No newline at end of file diff --git a/mycroft/res/text/ca-es/learning enabled.dialog b/mycroft/res/text/ca-es/learning enabled.dialog deleted file mode 100644 index 297d3da42cf1..000000000000 --- a/mycroft/res/text/ca-es/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -A partir d'ara pujaré dades de les nostres interaccions a Mycroft AI per fer-me més intel·ligent. Per ara això inclou els teus enregistraments dient el meu nom per activar-me \ No newline at end of file diff --git a/mycroft/res/text/ca-es/message_rebooting.dialog b/mycroft/res/text/ca-es/message_rebooting.dialog deleted file mode 100644 index d0bd20d45a94..000000000000 --- a/mycroft/res/text/ca-es/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -S'ESTÀ REINICIANT... \ No newline at end of file diff --git a/mycroft/res/text/ca-es/message_synching.clock.dialog b/mycroft/res/text/ca-es/message_synching.clock.dialog deleted file mode 100644 index fb9e8525ff05..000000000000 --- a/mycroft/res/text/ca-es/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < S'ESTÀ SINCRONITZANT < < < \ No newline at end of file diff --git a/mycroft/res/text/ca-es/message_updating.dialog b/mycroft/res/text/ca-es/message_updating.dialog deleted file mode 100644 index b1253ee01074..000000000000 --- a/mycroft/res/text/ca-es/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < S'ESTÀ PUJANT < < < \ No newline at end of file diff --git a/mycroft/res/text/ca-es/mycroft.intro.dialog b/mycroft/res/text/ca-es/mycroft.intro.dialog deleted file mode 100644 index cadd2e591bd8..000000000000 --- a/mycroft/res/text/ca-es/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Hola sóc Mycroft, el teu nou assistent. Per ajudar-te necessito estar connectat a Internet. Pots connectar-me amb un cable de xarxa o utilitzar Wi-Fi. Segueix aquestes instruccions per configurar la Wi-Fi: \ No newline at end of file diff --git a/mycroft/res/text/ca-es/no.voc b/mycroft/res/text/ca-es/no.voc deleted file mode 100644 index 5ef1105cd84f..000000000000 --- a/mycroft/res/text/ca-es/no.voc +++ /dev/null @@ -1,3 +0,0 @@ -no -i ara! -negatiu \ No newline at end of file diff --git a/mycroft/res/text/ca-es/not connected to the internet.dialog b/mycroft/res/text/ca-es/not connected to the internet.dialog deleted file mode 100644 index f4f0f94323d2..000000000000 --- a/mycroft/res/text/ca-es/not connected to the internet.dialog +++ /dev/null @@ -1,5 +0,0 @@ -Sembla que no estic connectat a Internet, comprova la connexió de xarxa. -Crec que no estic connectat a Internet. Pots comprovar la connexió? -No puc accedir a Internet en aquest moment, comprova la connexió de xarxa. -No aconsegueixo connectar-me a Internet, pots comprovar la connexió? -Estic tenint problemes per accedir a Internet en aquest moment, comprova la connexió de xarxa. \ No newline at end of file diff --git a/mycroft/res/text/ca-es/not.loaded.dialog b/mycroft/res/text/ca-es/not.loaded.dialog deleted file mode 100644 index e2f2bd039713..000000000000 --- a/mycroft/res/text/ca-es/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Espera un moment mentre acabo d'iniciar-me. \ No newline at end of file diff --git a/mycroft/res/text/ca-es/phonetic_spellings.txt b/mycroft/res/text/ca-es/phonetic_spellings.txt deleted file mode 100644 index dfa3cb9a674e..000000000000 --- a/mycroft/res/text/ca-es/phonetic_spellings.txt +++ /dev/null @@ -1,5 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. -mycroftai: mycroft A.I. -spotify: spot-ify -corgi: core-gee diff --git a/mycroft/res/text/ca-es/reset to factory defaults.dialog b/mycroft/res/text/ca-es/reset to factory defaults.dialog deleted file mode 100644 index 09507b24b8cd..000000000000 --- a/mycroft/res/text/ca-es/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -He estat restablert als valors per defecte. \ No newline at end of file diff --git a/mycroft/res/text/ca-es/skill.error.dialog b/mycroft/res/text/ca-es/skill.error.dialog deleted file mode 100644 index cb39a6bc2ff6..000000000000 --- a/mycroft/res/text/ca-es/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -S'ha produït un error en processar una sol·licitud a {{skill}} \ No newline at end of file diff --git a/mycroft/res/text/ca-es/skills updated.dialog b/mycroft/res/text/ca-es/skills updated.dialog deleted file mode 100644 index c9252d283910..000000000000 --- a/mycroft/res/text/ca-es/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Actualment estic actualitzat -Habilitats actualitzades. Estic preparat per ajudar-te. diff --git a/mycroft/res/text/ca-es/sorry I couldn't install default skills.dialog b/mycroft/res/text/ca-es/sorry I couldn't install default skills.dialog deleted file mode 100644 index e257087f8bb9..000000000000 --- a/mycroft/res/text/ca-es/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -s'ha produït un error en actualitzar les habilitats diff --git a/mycroft/res/text/ca-es/ssh disabled.dialog b/mycroft/res/text/ca-es/ssh disabled.dialog deleted file mode 100644 index e06b862beb1f..000000000000 --- a/mycroft/res/text/ca-es/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -S'ha desactivat l'inici de sessió per SSH \ No newline at end of file diff --git a/mycroft/res/text/ca-es/ssh enabled.dialog b/mycroft/res/text/ca-es/ssh enabled.dialog deleted file mode 100644 index 686aa5dacf77..000000000000 --- a/mycroft/res/text/ca-es/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Ara es permeten els inicis de sessió per SSH \ No newline at end of file diff --git a/mycroft/res/text/ca-es/time.changed.reboot.dialog b/mycroft/res/text/ca-es/time.changed.reboot.dialog deleted file mode 100644 index fcf60fc45845..000000000000 --- a/mycroft/res/text/ca-es/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Cal reiniciar-me després de sincronitzar el meu rellotge amb Internet, torno de seguida. \ No newline at end of file diff --git a/mycroft/res/text/ca-es/yes.voc b/mycroft/res/text/ca-es/yes.voc deleted file mode 100644 index 1ba84a004d1d..000000000000 --- a/mycroft/res/text/ca-es/yes.voc +++ /dev/null @@ -1,5 +0,0 @@ -sí -oi tant! -així és -per descomptat -si us plau \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/and.word b/mycroft/res/text/cs-cz/and.word deleted file mode 100644 index 2e65efe2a145..000000000000 --- a/mycroft/res/text/cs-cz/and.word +++ /dev/null @@ -1 +0,0 @@ -a \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/backend.down.dialog b/mycroft/res/text/cs-cz/backend.down.dialog deleted file mode 100644 index 6ebaa81c1fd2..000000000000 --- a/mycroft/res/text/cs-cz/backend.down.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Mám problém s komunikací se servery Mycroftu. Prosím, dejte mi pár minut než na mě budete mluvit. -Mám problém s komunikací se servery Mycroftu. Prosím, počkejte pár minut než na mě budete mluvit. -Vypadá to, že se nemohu připojit k serverům Mycroftu. Prosím, dejte mi pár minut než na mě budete mluvit. -Vypadá to, že se nemohu připojit k serverům Mycroftu. Prosím, počkejte pár pár minut než na mě budete mluvit. \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/cancel.voc b/mycroft/res/text/cs-cz/cancel.voc deleted file mode 100644 index 30884219659d..000000000000 --- a/mycroft/res/text/cs-cz/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -zrušit -nevadí -zapomeň to diff --git a/mycroft/res/text/cs-cz/checking for updates.dialog b/mycroft/res/text/cs-cz/checking for updates.dialog deleted file mode 100644 index 01c3c2f1725c..000000000000 --- a/mycroft/res/text/cs-cz/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Kontroluji aktualizace -Prosím o chvilku strpení, akltualizuji se diff --git a/mycroft/res/text/cs-cz/common_play.voc b/mycroft/res/text/cs-cz/common_play.voc deleted file mode 100644 index 8157507417b2..000000000000 --- a/mycroft/res/text/cs-cz/common_play.voc +++ /dev/null @@ -1,5 +0,0 @@ -přehrát -přehrávání -přehrávat -přehrát -OCP diff --git a/mycroft/res/text/cs-cz/day.word b/mycroft/res/text/cs-cz/day.word deleted file mode 100644 index aaf7116c6144..000000000000 --- a/mycroft/res/text/cs-cz/day.word +++ /dev/null @@ -1 +0,0 @@ -den \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/days.word b/mycroft/res/text/cs-cz/days.word deleted file mode 100644 index ed195f76a30f..000000000000 --- a/mycroft/res/text/cs-cz/days.word +++ /dev/null @@ -1 +0,0 @@ -dny \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/hour.word b/mycroft/res/text/cs-cz/hour.word deleted file mode 100644 index e8a056520fce..000000000000 --- a/mycroft/res/text/cs-cz/hour.word +++ /dev/null @@ -1 +0,0 @@ -hodina \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/hours.word b/mycroft/res/text/cs-cz/hours.word deleted file mode 100644 index c62f391367da..000000000000 --- a/mycroft/res/text/cs-cz/hours.word +++ /dev/null @@ -1 +0,0 @@ -hodiny \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/i didn't catch that.dialog b/mycroft/res/text/cs-cz/i didn't catch that.dialog deleted file mode 100644 index 31107c589d20..000000000000 --- a/mycroft/res/text/cs-cz/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Omlouvám se, nerozumněl jsem -Bojím se, že jsem neporozumněl -Můžete to říci znovu? -Můžete to zopakovat? diff --git a/mycroft/res/text/cs-cz/last.voc b/mycroft/res/text/cs-cz/last.voc deleted file mode 100644 index 91b20b5263cc..000000000000 --- a/mycroft/res/text/cs-cz/last.voc +++ /dev/null @@ -1,2 +0,0 @@ -poslední možnost -poslední \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/learning disabled.dialog b/mycroft/res/text/cs-cz/learning disabled.dialog deleted file mode 100644 index f862630b9a6e..000000000000 --- a/mycroft/res/text/cs-cz/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Interakční data nebudou dále odesílána do Mycroft AI. \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/learning enabled.dialog b/mycroft/res/text/cs-cz/learning enabled.dialog deleted file mode 100644 index d0bf9b620e8e..000000000000 --- a/mycroft/res/text/cs-cz/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Od teď budu odesílat interakční data Mycroft AI pro účely učení. Momentálně to obsahuje i nahrávání wake-word aktivace. \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/message_loading.skills.dialog b/mycroft/res/text/cs-cz/message_loading.skills.dialog deleted file mode 100644 index 38295c608a60..000000000000 --- a/mycroft/res/text/cs-cz/message_loading.skills.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < NAČÍTÁNÍ < < < \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/message_rebooting.dialog b/mycroft/res/text/cs-cz/message_rebooting.dialog deleted file mode 100644 index 35d08e0f03f4..000000000000 --- a/mycroft/res/text/cs-cz/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -RESTARTUJI... \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/message_synching.clock.dialog b/mycroft/res/text/cs-cz/message_synching.clock.dialog deleted file mode 100644 index 6acdb716133e..000000000000 --- a/mycroft/res/text/cs-cz/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNCHRONIZACE < < < \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/message_updating.dialog b/mycroft/res/text/cs-cz/message_updating.dialog deleted file mode 100644 index 20e4c63e6f8c..000000000000 --- a/mycroft/res/text/cs-cz/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < AKTUALIZUJI < < < \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/minute.word b/mycroft/res/text/cs-cz/minute.word deleted file mode 100644 index 02810dfef34d..000000000000 --- a/mycroft/res/text/cs-cz/minute.word +++ /dev/null @@ -1 +0,0 @@ -minuta \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/minutes.word b/mycroft/res/text/cs-cz/minutes.word deleted file mode 100644 index 5181d686a36e..000000000000 --- a/mycroft/res/text/cs-cz/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minuty \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/mycroft.intro.dialog b/mycroft/res/text/cs-cz/mycroft.intro.dialog deleted file mode 100644 index 3a4a609523a0..000000000000 --- a/mycroft/res/text/cs-cz/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Dobrý den, já jsem Mycroft, váš nový hlasový asistent. Abych vám mohl asistovat, potřebuji být přpojen k internetu. Můžete mne připojit síťovým kabelem nebo přes wifi. Následujte tyto instrukce pro použití wifi: \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/no.voc b/mycroft/res/text/cs-cz/no.voc deleted file mode 100644 index 3b4762b8df77..000000000000 --- a/mycroft/res/text/cs-cz/no.voc +++ /dev/null @@ -1,2 +0,0 @@ -ne -nechci \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/noise_words.list b/mycroft/res/text/cs-cz/noise_words.list deleted file mode 100644 index 903cc3816560..000000000000 --- a/mycroft/res/text/cs-cz/noise_words.list +++ /dev/null @@ -1,24 +0,0 @@ -kde -co je -který -jim -oni -kdy -co -to -bude -od -z -že -také -kdo -jak -a -ale -také -proč -pro -je -to -nebo -do diff --git a/mycroft/res/text/cs-cz/not connected to the internet.dialog b/mycroft/res/text/cs-cz/not connected to the internet.dialog deleted file mode 100644 index acdb30153767..000000000000 --- a/mycroft/res/text/cs-cz/not connected to the internet.dialog +++ /dev/null @@ -1,3 +0,0 @@ -Zdá se, že nejsem připojen připojen k internetu, zkontrolujte prosím vaše síťové připojení. -Nemohu se připojit k internetu, zkontrolujte prosím vaše síťové připojení. -Mám problém se připojit k internetu, zkontrolujte prosím vaše síťové připojení. \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/not.loaded.dialog b/mycroft/res/text/cs-cz/not.loaded.dialog deleted file mode 100644 index 4d1e7fad4374..000000000000 --- a/mycroft/res/text/cs-cz/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Počkejte prosím chvíly než dokončím startování. \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/or.word b/mycroft/res/text/cs-cz/or.word deleted file mode 100644 index 38c14cabbcbc..000000000000 --- a/mycroft/res/text/cs-cz/or.word +++ /dev/null @@ -1 +0,0 @@ -nebo \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/phonetic_spellings.txt b/mycroft/res/text/cs-cz/phonetic_spellings.txt deleted file mode 100644 index dfa3cb9a674e..000000000000 --- a/mycroft/res/text/cs-cz/phonetic_spellings.txt +++ /dev/null @@ -1,5 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. -mycroftai: mycroft A.I. -spotify: spot-ify -corgi: core-gee diff --git a/mycroft/res/text/cs-cz/reset to factory defaults.dialog b/mycroft/res/text/cs-cz/reset to factory defaults.dialog deleted file mode 100644 index a021d5397022..000000000000 --- a/mycroft/res/text/cs-cz/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Byl jsem resetován do továrního nastavení. \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/second.word b/mycroft/res/text/cs-cz/second.word deleted file mode 100644 index ef210e25cfc2..000000000000 --- a/mycroft/res/text/cs-cz/second.word +++ /dev/null @@ -1 +0,0 @@ -sekunda \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/seconds.word b/mycroft/res/text/cs-cz/seconds.word deleted file mode 100644 index 91bf5861ded5..000000000000 --- a/mycroft/res/text/cs-cz/seconds.word +++ /dev/null @@ -1 +0,0 @@ -sekundy \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/skill.error.dialog b/mycroft/res/text/cs-cz/skill.error.dialog deleted file mode 100644 index f53b316f5327..000000000000 --- a/mycroft/res/text/cs-cz/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -Naskytla se chyba při zracování požadavku v {{skill}} \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/skills updated.dialog b/mycroft/res/text/cs-cz/skills updated.dialog deleted file mode 100644 index 059ac7d0fa78..000000000000 --- a/mycroft/res/text/cs-cz/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Nyní jsem zaktualizován na poslední verzi. -Dovednosti jsou zaktualizovány. Jsem připraven vám pomáhat. \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/sorry I couldn't install default skills.dialog b/mycroft/res/text/cs-cz/sorry I couldn't install default skills.dialog deleted file mode 100644 index 0e8bd5bf5668..000000000000 --- a/mycroft/res/text/cs-cz/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -vyskytla se chyba při aktualizaci dovedností \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/ssh disabled.dialog b/mycroft/res/text/cs-cz/ssh disabled.dialog deleted file mode 100644 index f5efc6e37e4f..000000000000 --- a/mycroft/res/text/cs-cz/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH přihlašování bylo zakázáno \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/ssh enabled.dialog b/mycroft/res/text/cs-cz/ssh enabled.dialog deleted file mode 100644 index e4961c272dab..000000000000 --- a/mycroft/res/text/cs-cz/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH přihlašování je povoleno \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/time.changed.reboot.dialog b/mycroft/res/text/cs-cz/time.changed.reboot.dialog deleted file mode 100644 index 313f04b06159..000000000000 --- a/mycroft/res/text/cs-cz/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Potřebuji se restartovat po synchronizaci času s internetem, hned budu zpět. \ No newline at end of file diff --git a/mycroft/res/text/cs-cz/yes.voc b/mycroft/res/text/cs-cz/yes.voc deleted file mode 100644 index 63974b07d4bf..000000000000 --- a/mycroft/res/text/cs-cz/yes.voc +++ /dev/null @@ -1,6 +0,0 @@ -ano -povrzuji -jistě -potvrzeno -souhlasím -prosím \ No newline at end of file diff --git a/mycroft/res/text/da-dk/and.word b/mycroft/res/text/da-dk/and.word deleted file mode 100644 index 3db2cff883a1..000000000000 --- a/mycroft/res/text/da-dk/and.word +++ /dev/null @@ -1 +0,0 @@ -og diff --git a/mycroft/res/text/da-dk/backend.down.dialog b/mycroft/res/text/da-dk/backend.down.dialog deleted file mode 100644 index 00638b919ad9..000000000000 --- a/mycroft/res/text/da-dk/backend.down.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Jeg har problemer med at kommunikere med Mycroft-serverne. Giv mig et par minutter, før du prøver at tale med mig. -Jeg har problemer med at kommunikere med Mycroft-serverne. Vent venligst et par minutter, før du prøver at tale med mig. -Det ser ud til, at jeg ikke kan oprette forbindelse til Mycroft-serverne. Giv mig et par minutter, før du prøver at tale med mig. -Det ser ud til, at jeg ikke kan oprette forbindelse til Mycroft-serverne. Vent venligst et par minutter, før du prøver at tale med mig. diff --git a/mycroft/res/text/da-dk/cancel.voc b/mycroft/res/text/da-dk/cancel.voc deleted file mode 100644 index 8bbcf0b913d7..000000000000 --- a/mycroft/res/text/da-dk/cancel.voc +++ /dev/null @@ -1,4 +0,0 @@ -afbryd -Glem det -abort -afslut \ No newline at end of file diff --git a/mycroft/res/text/da-dk/checking for updates.dialog b/mycroft/res/text/da-dk/checking for updates.dialog deleted file mode 100644 index f82994596708..000000000000 --- a/mycroft/res/text/da-dk/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Kontrollerer for opdateringer -vent et øjeblik, mens jeg opdaterer mig selv diff --git a/mycroft/res/text/da-dk/common_play.voc b/mycroft/res/text/da-dk/common_play.voc deleted file mode 100644 index 517137863f7f..000000000000 --- a/mycroft/res/text/da-dk/common_play.voc +++ /dev/null @@ -1,5 +0,0 @@ -afspille -afspil -spille -spil -OCP diff --git a/mycroft/res/text/da-dk/day.word b/mycroft/res/text/da-dk/day.word deleted file mode 100644 index 9e4015a98474..000000000000 --- a/mycroft/res/text/da-dk/day.word +++ /dev/null @@ -1 +0,0 @@ -dag diff --git a/mycroft/res/text/da-dk/days.word b/mycroft/res/text/da-dk/days.word deleted file mode 100644 index 9d526d03a5ee..000000000000 --- a/mycroft/res/text/da-dk/days.word +++ /dev/null @@ -1 +0,0 @@ -dage diff --git a/mycroft/res/text/da-dk/hour.word b/mycroft/res/text/da-dk/hour.word deleted file mode 100644 index 3f3e7c6703ff..000000000000 --- a/mycroft/res/text/da-dk/hour.word +++ /dev/null @@ -1 +0,0 @@ -time diff --git a/mycroft/res/text/da-dk/hours.word b/mycroft/res/text/da-dk/hours.word deleted file mode 100644 index a0bf4afd1f7e..000000000000 --- a/mycroft/res/text/da-dk/hours.word +++ /dev/null @@ -1 +0,0 @@ -timer diff --git a/mycroft/res/text/da-dk/i didn't catch that.dialog b/mycroft/res/text/da-dk/i didn't catch that.dialog deleted file mode 100644 index 8cc475e38df4..000000000000 --- a/mycroft/res/text/da-dk/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Undskyld, Det fangede jeg ikke -Jeg er bange for, at jeg ikke kunne forstå det -Kan du sige det igen? -Kan du venligst gentage det? diff --git a/mycroft/res/text/da-dk/last.voc b/mycroft/res/text/da-dk/last.voc deleted file mode 100644 index bcd713e75292..000000000000 --- a/mycroft/res/text/da-dk/last.voc +++ /dev/null @@ -1,3 +0,0 @@ -sidste valg -sidste mulighed -sidste diff --git a/mycroft/res/text/da-dk/learning disabled.dialog b/mycroft/res/text/da-dk/learning disabled.dialog deleted file mode 100644 index 2c53e154a6f0..000000000000 --- a/mycroft/res/text/da-dk/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Interaktionsdata vil ikke længere blive sendt til Mycroft AI. diff --git a/mycroft/res/text/da-dk/learning enabled.dialog b/mycroft/res/text/da-dk/learning enabled.dialog deleted file mode 100644 index eba2ab033451..000000000000 --- a/mycroft/res/text/da-dk/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Jeg vil nu uploade interaktionsdata til Mycroft AI for at give mig mulighed for at blive smartere.  I øjeblikket inkluderer dette optagelser af wake-word-aktiveringer. diff --git a/mycroft/res/text/da-dk/message_loading.skills.dialog b/mycroft/res/text/da-dk/message_loading.skills.dialog deleted file mode 100644 index 8827db56fdf4..000000000000 --- a/mycroft/res/text/da-dk/message_loading.skills.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < INDLÆSER < < <> diff --git a/mycroft/res/text/da-dk/message_rebooting.dialog b/mycroft/res/text/da-dk/message_rebooting.dialog deleted file mode 100644 index f21d8c4d7cb0..000000000000 --- a/mycroft/res/text/da-dk/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -GENSTARTER... diff --git a/mycroft/res/text/da-dk/message_synching.clock.dialog b/mycroft/res/text/da-dk/message_synching.clock.dialog deleted file mode 100644 index 81d09f90deb9..000000000000 --- a/mycroft/res/text/da-dk/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNC < < < \ No newline at end of file diff --git a/mycroft/res/text/da-dk/message_updating.dialog b/mycroft/res/text/da-dk/message_updating.dialog deleted file mode 100644 index 22ff0d847d99..000000000000 --- a/mycroft/res/text/da-dk/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < OPDATERER < < < diff --git a/mycroft/res/text/da-dk/minute.word b/mycroft/res/text/da-dk/minute.word deleted file mode 100644 index 155a2f0b856d..000000000000 --- a/mycroft/res/text/da-dk/minute.word +++ /dev/null @@ -1 +0,0 @@ -minut diff --git a/mycroft/res/text/da-dk/minutes.word b/mycroft/res/text/da-dk/minutes.word deleted file mode 100644 index 476acc7b3912..000000000000 --- a/mycroft/res/text/da-dk/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minutter diff --git a/mycroft/res/text/da-dk/mycroft.intro.dialog b/mycroft/res/text/da-dk/mycroft.intro.dialog deleted file mode 100644 index beb065ceef6d..000000000000 --- a/mycroft/res/text/da-dk/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Hej jeg er Mycroft, din nye assistent. For at hjælpe dig skal jeg være tilsluttet internettet. Du kan enten tilslutte mig et netværkskabel, eller brug wifi. Følg disse instruktioner for at konfigurere wifi: diff --git a/mycroft/res/text/da-dk/no.voc b/mycroft/res/text/da-dk/no.voc deleted file mode 100644 index ec9532ea922d..000000000000 --- a/mycroft/res/text/da-dk/no.voc +++ /dev/null @@ -1,5 +0,0 @@ -nope -nix -nah -negativ -nej \ No newline at end of file diff --git a/mycroft/res/text/da-dk/not connected to the internet.dialog b/mycroft/res/text/da-dk/not connected to the internet.dialog deleted file mode 100644 index 54a31dfac742..000000000000 --- a/mycroft/res/text/da-dk/not connected to the internet.dialog +++ /dev/null @@ -1,5 +0,0 @@ -Det ser ud til, at jeg ikke har forbindelse til Internettet, Kontroller din netværksforbindelse. -Jeg ser ikke ud til at være tilsluttet internettet, Kontroller din netværksforbindelse. -Jeg kan ikke forbinde til internettet lige nu, Kontroller din netværksforbindelse. -Jeg kan ikke forbinde til internettet, Kontroller din netværksforbindelse. -Jeg har problemer med at forbinde til internettet lige nu, Kontroller din netværksforbindelse. diff --git a/mycroft/res/text/da-dk/not.loaded.dialog b/mycroft/res/text/da-dk/not.loaded.dialog deleted file mode 100644 index e82e8c78ae1d..000000000000 --- a/mycroft/res/text/da-dk/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Vent et øjeblik, til jeg er færdig med at starte op. diff --git a/mycroft/res/text/da-dk/or.word b/mycroft/res/text/da-dk/or.word deleted file mode 100644 index 3a97698c63bd..000000000000 --- a/mycroft/res/text/da-dk/or.word +++ /dev/null @@ -1 +0,0 @@ -eller diff --git a/mycroft/res/text/da-dk/phonetic_spellings.txt b/mycroft/res/text/da-dk/phonetic_spellings.txt deleted file mode 100644 index 06eb41a79b88..000000000000 --- a/mycroft/res/text/da-dk/phonetic_spellings.txt +++ /dev/null @@ -1,13 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. -mycroft: mejkråft -open: åpen -source: sårhse -seksten: sejsten -spotify: spåtifej -spot-ify: spåtifej -chat: tjat -wifi: vejfej -uploade: oplåte -wake-word-aktiveringer: wæik word aktiveringer -SSH-login: SSH-log-in \ No newline at end of file diff --git a/mycroft/res/text/da-dk/reset to factory defaults.dialog b/mycroft/res/text/da-dk/reset to factory defaults.dialog deleted file mode 100644 index ec343723a861..000000000000 --- a/mycroft/res/text/da-dk/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Jeg er nulstillet til fabriksindstillinger. diff --git a/mycroft/res/text/da-dk/second.word b/mycroft/res/text/da-dk/second.word deleted file mode 100644 index 1c4aa7d3d59f..000000000000 --- a/mycroft/res/text/da-dk/second.word +++ /dev/null @@ -1 +0,0 @@ -anden diff --git a/mycroft/res/text/da-dk/seconds.word b/mycroft/res/text/da-dk/seconds.word deleted file mode 100644 index d27a05a918ba..000000000000 --- a/mycroft/res/text/da-dk/seconds.word +++ /dev/null @@ -1 +0,0 @@ -sekunder diff --git a/mycroft/res/text/da-dk/skill.error.dialog b/mycroft/res/text/da-dk/skill.error.dialog deleted file mode 100644 index 8ea1edecd312..000000000000 --- a/mycroft/res/text/da-dk/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -Der opstod en fejl under behandling af en anmodning i {{skill}} diff --git a/mycroft/res/text/da-dk/skills updated.dialog b/mycroft/res/text/da-dk/skills updated.dialog deleted file mode 100644 index cb74fe479876..000000000000 --- a/mycroft/res/text/da-dk/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Jeg er opdateret nu -Færdigheder opdateret.  Jeg er klar til at hjælpe dig. diff --git a/mycroft/res/text/da-dk/sorry I couldn't install default skills.dialog b/mycroft/res/text/da-dk/sorry I couldn't install default skills.dialog deleted file mode 100644 index d2a863365bc5..000000000000 --- a/mycroft/res/text/da-dk/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -der opstod en fejl under opdatering af færdigheder diff --git a/mycroft/res/text/da-dk/ssh disabled.dialog b/mycroft/res/text/da-dk/ssh disabled.dialog deleted file mode 100644 index 70547678d4f8..000000000000 --- a/mycroft/res/text/da-dk/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH-login er deaktiveret diff --git a/mycroft/res/text/da-dk/ssh enabled.dialog b/mycroft/res/text/da-dk/ssh enabled.dialog deleted file mode 100644 index e19adcca99bc..000000000000 --- a/mycroft/res/text/da-dk/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH-login er nu tilladt diff --git a/mycroft/res/text/da-dk/time.changed.reboot.dialog b/mycroft/res/text/da-dk/time.changed.reboot.dialog deleted file mode 100644 index 603f5f749062..000000000000 --- a/mycroft/res/text/da-dk/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Jeg bliver nødt til at genstarte efter at have synkroniseret mit ur med internettet. Jeg er straks tilbage. diff --git a/mycroft/res/text/da-dk/yes.voc b/mycroft/res/text/da-dk/yes.voc deleted file mode 100644 index 8ff628abf811..000000000000 --- a/mycroft/res/text/da-dk/yes.voc +++ /dev/null @@ -1,5 +0,0 @@ -Ja -yeah -jep -jo da -jepper \ No newline at end of file diff --git a/mycroft/res/text/de-de/and.word b/mycroft/res/text/de-de/and.word deleted file mode 100644 index ee61ac994930..000000000000 --- a/mycroft/res/text/de-de/and.word +++ /dev/null @@ -1 +0,0 @@ -und diff --git a/mycroft/res/text/de-de/backend.down.dialog b/mycroft/res/text/de-de/backend.down.dialog deleted file mode 100644 index 6ee38fc3d4f8..000000000000 --- a/mycroft/res/text/de-de/backend.down.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Ich habe Probleme bei der Kommunikation mit dem Mycroft Server. Bitte warte ein paar Minuten und versuche es dann noch einmal. -Ich kann mich nicht mit dem Mycroft Server verbinden. Bitte versuche es später noch einmal. diff --git a/mycroft/res/text/de-de/cancel.voc b/mycroft/res/text/de-de/cancel.voc deleted file mode 100644 index 59e2d432c6cd..000000000000 --- a/mycroft/res/text/de-de/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -abbrechen -Vergiss es -verwerfen \ No newline at end of file diff --git a/mycroft/res/text/de-de/checking for updates.dialog b/mycroft/res/text/de-de/checking for updates.dialog deleted file mode 100644 index ddb332e11e65..000000000000 --- a/mycroft/res/text/de-de/checking for updates.dialog +++ /dev/null @@ -1,3 +0,0 @@ -Suche nach Updates -kleinen Moment während ich mich aktualisiere -bitte warte während ich mich aktualisiere \ No newline at end of file diff --git a/mycroft/res/text/de-de/common_play.voc b/mycroft/res/text/de-de/common_play.voc deleted file mode 100644 index 93c92bc4c594..000000000000 --- a/mycroft/res/text/de-de/common_play.voc +++ /dev/null @@ -1,5 +0,0 @@ -spiel -spiele -start -starte -OCP diff --git a/mycroft/res/text/de-de/day.word b/mycroft/res/text/de-de/day.word deleted file mode 100644 index 1aa7c259b4f1..000000000000 --- a/mycroft/res/text/de-de/day.word +++ /dev/null @@ -1 +0,0 @@ -Tag diff --git a/mycroft/res/text/de-de/days.word b/mycroft/res/text/de-de/days.word deleted file mode 100644 index 4c2fd37c1baf..000000000000 --- a/mycroft/res/text/de-de/days.word +++ /dev/null @@ -1 +0,0 @@ -Tage diff --git a/mycroft/res/text/de-de/hour.word b/mycroft/res/text/de-de/hour.word deleted file mode 100644 index 7e69c570914c..000000000000 --- a/mycroft/res/text/de-de/hour.word +++ /dev/null @@ -1 +0,0 @@ -Stunde diff --git a/mycroft/res/text/de-de/hours.word b/mycroft/res/text/de-de/hours.word deleted file mode 100644 index 3c728ba83cee..000000000000 --- a/mycroft/res/text/de-de/hours.word +++ /dev/null @@ -1 +0,0 @@ -Stunden diff --git a/mycroft/res/text/de-de/i didn't catch that.dialog b/mycroft/res/text/de-de/i didn't catch that.dialog deleted file mode 100644 index e87dc7bbac85..000000000000 --- a/mycroft/res/text/de-de/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Entschuldigung, ich habe das nicht verstanden -Ich fürchte, ich habe das nicht verstanden -kannst du das noch einmal wiederholen? -kannst du das nochmal sagen? \ No newline at end of file diff --git a/mycroft/res/text/de-de/last.voc b/mycroft/res/text/de-de/last.voc deleted file mode 100644 index 4c691859809a..000000000000 --- a/mycroft/res/text/de-de/last.voc +++ /dev/null @@ -1,8 +0,0 @@ -letzte -letzter -letztes -letzten -letztem -letzteres -schluss -ende diff --git a/mycroft/res/text/de-de/learning disabled.dialog b/mycroft/res/text/de-de/learning disabled.dialog deleted file mode 100644 index 5ef8d3a1802d..000000000000 --- a/mycroft/res/text/de-de/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Interaktionsdaten werden nicht mehr an Mycroft AI gesendet. \ No newline at end of file diff --git a/mycroft/res/text/de-de/learning enabled.dialog b/mycroft/res/text/de-de/learning enabled.dialog deleted file mode 100644 index 4ad60406aadd..000000000000 --- a/mycroft/res/text/de-de/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Ich werde jetzt die Interaktionsdaten zu Mycroft AI hochladen, damit ich intelligenter werden kann. Diese beinhalten die kompletten Aufzeichnungen ab dem Aktivierungswort. \ No newline at end of file diff --git a/mycroft/res/text/de-de/message_rebooting.dialog b/mycroft/res/text/de-de/message_rebooting.dialog deleted file mode 100644 index 433db32624a0..000000000000 --- a/mycroft/res/text/de-de/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -Neustart... \ No newline at end of file diff --git a/mycroft/res/text/de-de/message_synching.clock.dialog b/mycroft/res/text/de-de/message_synching.clock.dialog deleted file mode 100644 index 8aeb858b47a4..000000000000 --- a/mycroft/res/text/de-de/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNC < < < \ No newline at end of file diff --git a/mycroft/res/text/de-de/message_updating.dialog b/mycroft/res/text/de-de/message_updating.dialog deleted file mode 100644 index 6d5a6b2fc7db..000000000000 --- a/mycroft/res/text/de-de/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < UPDATING < < < \ No newline at end of file diff --git a/mycroft/res/text/de-de/minute.word b/mycroft/res/text/de-de/minute.word deleted file mode 100644 index de476669d9a2..000000000000 --- a/mycroft/res/text/de-de/minute.word +++ /dev/null @@ -1 +0,0 @@ -Minute diff --git a/mycroft/res/text/de-de/minutes.word b/mycroft/res/text/de-de/minutes.word deleted file mode 100644 index bdc262ecf35b..000000000000 --- a/mycroft/res/text/de-de/minutes.word +++ /dev/null @@ -1 +0,0 @@ -Minuten diff --git a/mycroft/res/text/de-de/mycroft.intro.dialog b/mycroft/res/text/de-de/mycroft.intro.dialog deleted file mode 100644 index d8522fdbc6f4..000000000000 --- a/mycroft/res/text/de-de/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Hallo ich bin Mycroft, dein neuer Butler. Um dir zu assistieren brauche ich eine Verbindung zum Internet. Du kannst mich per Kabel verbinden oder per WLAN. Folge der Anweisung um das WLAN zu konfigurieren: \ No newline at end of file diff --git a/mycroft/res/text/de-de/no.voc b/mycroft/res/text/de-de/no.voc deleted file mode 100644 index f582da35f58b..000000000000 --- a/mycroft/res/text/de-de/no.voc +++ /dev/null @@ -1,3 +0,0 @@ -Nein -Nö -Negative diff --git a/mycroft/res/text/de-de/noise_words.list b/mycroft/res/text/de-de/noise_words.list deleted file mode 100644 index cc619c9fc0ff..000000000000 --- a/mycroft/res/text/de-de/noise_words.list +++ /dev/null @@ -1,52 +0,0 @@ -wo -wohin -sie -ihnen -sie -man -wann -als -wo -was -welcher -welche -welches -der -die -das -dass -daß -werden -werde -wirst -wird -werdet -wollen -willst -von -auch -wer -wie -tat -taten -und -aber -auch -warum -für -ist -es -tun -tut -oder -zu -auf -bis -von -aus -um -ein -einer -eines -mal -bitte diff --git a/mycroft/res/text/de-de/not connected to the internet.dialog b/mycroft/res/text/de-de/not connected to the internet.dialog deleted file mode 100644 index e22bb2b17bac..000000000000 --- a/mycroft/res/text/de-de/not connected to the internet.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Es sieht so aus, als wäre ich nicht mit dem Internet verbunden -Es scheint als wäre ich nicht mit dem Internet verbunden -Ich kann das Internet gerade nicht erreichen -Es ist mir gerade nicht möglich das Internet zu erreichen \ No newline at end of file diff --git a/mycroft/res/text/de-de/not.loaded.dialog b/mycroft/res/text/de-de/not.loaded.dialog deleted file mode 100644 index 3d6a40105bfe..000000000000 --- a/mycroft/res/text/de-de/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -bitte warte einen moment bis ich fertig mit dem booten bin \ No newline at end of file diff --git a/mycroft/res/text/de-de/or.word b/mycroft/res/text/de-de/or.word deleted file mode 100644 index 2fbe53211b8f..000000000000 --- a/mycroft/res/text/de-de/or.word +++ /dev/null @@ -1 +0,0 @@ -oder diff --git a/mycroft/res/text/de-de/phonetic_spellings.txt b/mycroft/res/text/de-de/phonetic_spellings.txt deleted file mode 100644 index cb650b5edba4..000000000000 --- a/mycroft/res/text/de-de/phonetic_spellings.txt +++ /dev/null @@ -1,2 +0,0 @@ -jalapeno: halapenyo -ai: ey ei \ No newline at end of file diff --git a/mycroft/res/text/de-de/reset to factory defaults.dialog b/mycroft/res/text/de-de/reset to factory defaults.dialog deleted file mode 100644 index 2fc6fed060e6..000000000000 --- a/mycroft/res/text/de-de/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Ich habe mich zurückgesetzt, auf Werkseinstellung. \ No newline at end of file diff --git a/mycroft/res/text/de-de/second.word b/mycroft/res/text/de-de/second.word deleted file mode 100644 index e658c2198da6..000000000000 --- a/mycroft/res/text/de-de/second.word +++ /dev/null @@ -1 +0,0 @@ -Sekunde diff --git a/mycroft/res/text/de-de/seconds.word b/mycroft/res/text/de-de/seconds.word deleted file mode 100644 index 2c54f29cb9cc..000000000000 --- a/mycroft/res/text/de-de/seconds.word +++ /dev/null @@ -1 +0,0 @@ -Sekunden diff --git a/mycroft/res/text/de-de/skill.error.dialog b/mycroft/res/text/de-de/skill.error.dialog deleted file mode 100644 index 9f560ca52b68..000000000000 --- a/mycroft/res/text/de-de/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -Bei der Verarbeitung der Anfrage ist ein Fehler im Skill {{skill}} aufgetreten. diff --git a/mycroft/res/text/de-de/skills updated.dialog b/mycroft/res/text/de-de/skills updated.dialog deleted file mode 100644 index 5bfe348f2275..000000000000 --- a/mycroft/res/text/de-de/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Ich bin auf dem neuesten Stand -Fähigkeiten aktualisiert. Ich bin jetzt bereit dir zu helfen. \ No newline at end of file diff --git a/mycroft/res/text/de-de/sorry I couldn't install default skills.dialog b/mycroft/res/text/de-de/sorry I couldn't install default skills.dialog deleted file mode 100644 index cbebbda325cc..000000000000 --- a/mycroft/res/text/de-de/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -Ein Fehler ist aufgetreten während der Aktualisierung der Fähigkeiten. \ No newline at end of file diff --git a/mycroft/res/text/de-de/ssh disabled.dialog b/mycroft/res/text/de-de/ssh disabled.dialog deleted file mode 100644 index d2a376d76dd5..000000000000 --- a/mycroft/res/text/de-de/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH anmeldung ist nicht möglich. \ No newline at end of file diff --git a/mycroft/res/text/de-de/ssh enabled.dialog b/mycroft/res/text/de-de/ssh enabled.dialog deleted file mode 100644 index 68e5ea978289..000000000000 --- a/mycroft/res/text/de-de/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH Anmeldung ist jetzt möglich. \ No newline at end of file diff --git a/mycroft/res/text/de-de/time.changed.reboot.dialog b/mycroft/res/text/de-de/time.changed.reboot.dialog deleted file mode 100644 index 549e2c5d79cc..000000000000 --- a/mycroft/res/text/de-de/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Ich muss neu starten um die Uhr zu synchronisieren. Bin gleich wieder zurück. diff --git a/mycroft/res/text/de-de/yes.voc b/mycroft/res/text/de-de/yes.voc deleted file mode 100644 index 82afd9f2b6ef..000000000000 --- a/mycroft/res/text/de-de/yes.voc +++ /dev/null @@ -1,4 +0,0 @@ -Ja -Jawohl -Sicher -Na klaro diff --git a/mycroft/res/text/en-us/and.word b/mycroft/res/text/en-us/and.word deleted file mode 100644 index c51107c2e053..000000000000 --- a/mycroft/res/text/en-us/and.word +++ /dev/null @@ -1 +0,0 @@ -and \ No newline at end of file diff --git a/mycroft/res/text/en-us/backend.down.dialog b/mycroft/res/text/en-us/backend.down.dialog deleted file mode 100644 index 65e811389f69..000000000000 --- a/mycroft/res/text/en-us/backend.down.dialog +++ /dev/null @@ -1,4 +0,0 @@ -I'm having trouble communicating with the Mycroft servers. Please give me a few minutes before trying to speak to me. -I'm having trouble communicating with the Mycroft servers. Please wait few minutes before trying to speak to me. -It seems I cannot connect to the Mycroft servers. Please give me a few minutes before trying to speak to me. -It seems I cannot connect to the Mycroft servers. Please wait few minutes before trying to speak to me. \ No newline at end of file diff --git a/mycroft/res/text/en-us/cancel.voc b/mycroft/res/text/en-us/cancel.voc deleted file mode 100644 index 590d82b652e8..000000000000 --- a/mycroft/res/text/en-us/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -cancel -nevermind -forget it diff --git a/mycroft/res/text/en-us/checking for updates.dialog b/mycroft/res/text/en-us/checking for updates.dialog deleted file mode 100644 index fbae726688af..000000000000 --- a/mycroft/res/text/en-us/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Checking for updates -Just a moment while I update myself diff --git a/mycroft/res/text/en-us/common_play.voc b/mycroft/res/text/en-us/common_play.voc deleted file mode 100644 index 9aabfd284704..000000000000 --- a/mycroft/res/text/en-us/common_play.voc +++ /dev/null @@ -1,4 +0,0 @@ -play -playing -playback -OCP \ No newline at end of file diff --git a/mycroft/res/text/en-us/configurations.json b/mycroft/res/text/en-us/configurations.json deleted file mode 100644 index 4aade4deeb84..000000000000 --- a/mycroft/res/text/en-us/configurations.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "unit system": { - "metric": { - "system_unit": "metric" - }, - "imperial": { - "system_unit": "imperial" - } - }, - "location": { - "stockholm": { - "location": { - "city": { - "name": "Stockholm", - "state": { - "code": "SE.18", - "country": { - "code": "SE", - "name": "Sweden" - }, - "name": "Stockholm" - } - }, - "coordinate": { - "latitude": 59.38306, - "longitude": 16.66667 - }, - "timezone": { - "code": "Europe/Stockholm", - "dstOffset": 7200000, - "name": "Europe/Stockholm", - "offset": 3600000 - } - } - } - } -} diff --git a/mycroft/res/text/en-us/day.word b/mycroft/res/text/en-us/day.word deleted file mode 100644 index 0c303a4156da..000000000000 --- a/mycroft/res/text/en-us/day.word +++ /dev/null @@ -1 +0,0 @@ -day \ No newline at end of file diff --git a/mycroft/res/text/en-us/days.word b/mycroft/res/text/en-us/days.word deleted file mode 100644 index 5eb8de3056d1..000000000000 --- a/mycroft/res/text/en-us/days.word +++ /dev/null @@ -1 +0,0 @@ -days \ No newline at end of file diff --git a/mycroft/res/text/en-us/hour.word b/mycroft/res/text/en-us/hour.word deleted file mode 100644 index a13960e969a9..000000000000 --- a/mycroft/res/text/en-us/hour.word +++ /dev/null @@ -1 +0,0 @@ -hour \ No newline at end of file diff --git a/mycroft/res/text/en-us/hours.word b/mycroft/res/text/en-us/hours.word deleted file mode 100644 index 62c6decf0b20..000000000000 --- a/mycroft/res/text/en-us/hours.word +++ /dev/null @@ -1 +0,0 @@ -hours \ No newline at end of file diff --git a/mycroft/res/text/en-us/i didn't catch that.dialog b/mycroft/res/text/en-us/i didn't catch that.dialog deleted file mode 100644 index 8597eb56d9ee..000000000000 --- a/mycroft/res/text/en-us/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Sorry, I didn't catch that -I'm afraid I couldn't understand that -Can you say that again? -Can you please repeat that? diff --git a/mycroft/res/text/en-us/last.voc b/mycroft/res/text/en-us/last.voc deleted file mode 100644 index fa6a76f4f99e..000000000000 --- a/mycroft/res/text/en-us/last.voc +++ /dev/null @@ -1,3 +0,0 @@ -last -final -latter diff --git a/mycroft/res/text/en-us/learning disabled.dialog b/mycroft/res/text/en-us/learning disabled.dialog deleted file mode 100644 index eeb4d2240ea5..000000000000 --- a/mycroft/res/text/en-us/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Interaction data will no longer be submitted to Mycroft AI. \ No newline at end of file diff --git a/mycroft/res/text/en-us/learning enabled.dialog b/mycroft/res/text/en-us/learning enabled.dialog deleted file mode 100644 index 75c9f19a8c87..000000000000 --- a/mycroft/res/text/en-us/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -I will now upload interaction data to Mycroft AI to allow me to get smarter. Currently this includes recordings of wake-word activations. \ No newline at end of file diff --git a/mycroft/res/text/en-us/message_loading.skills.dialog b/mycroft/res/text/en-us/message_loading.skills.dialog deleted file mode 100644 index 1262fb17c71c..000000000000 --- a/mycroft/res/text/en-us/message_loading.skills.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < LOADING < < < \ No newline at end of file diff --git a/mycroft/res/text/en-us/message_rebooting.dialog b/mycroft/res/text/en-us/message_rebooting.dialog deleted file mode 100644 index d0fa31b1ee2c..000000000000 --- a/mycroft/res/text/en-us/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -REBOOTING... \ No newline at end of file diff --git a/mycroft/res/text/en-us/message_synching.clock.dialog b/mycroft/res/text/en-us/message_synching.clock.dialog deleted file mode 100644 index 8aeb858b47a4..000000000000 --- a/mycroft/res/text/en-us/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNC < < < \ No newline at end of file diff --git a/mycroft/res/text/en-us/message_updating.dialog b/mycroft/res/text/en-us/message_updating.dialog deleted file mode 100644 index 6d5a6b2fc7db..000000000000 --- a/mycroft/res/text/en-us/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < UPDATING < < < \ No newline at end of file diff --git a/mycroft/res/text/en-us/minute.word b/mycroft/res/text/en-us/minute.word deleted file mode 100644 index 50bc2f279d78..000000000000 --- a/mycroft/res/text/en-us/minute.word +++ /dev/null @@ -1 +0,0 @@ -minute \ No newline at end of file diff --git a/mycroft/res/text/en-us/minutes.word b/mycroft/res/text/en-us/minutes.word deleted file mode 100644 index cde6523a1fed..000000000000 --- a/mycroft/res/text/en-us/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minutes \ No newline at end of file diff --git a/mycroft/res/text/en-us/mycroft.intro.dialog b/mycroft/res/text/en-us/mycroft.intro.dialog deleted file mode 100644 index da34e1bd4e74..000000000000 --- a/mycroft/res/text/en-us/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Hello I am Mycroft, your new assistant. To assist you I need to be connected to the internet. You can either plug me in with a network cable, or use wifi. Follow these instructions to set up wifi: \ No newline at end of file diff --git a/mycroft/res/text/en-us/no.voc b/mycroft/res/text/en-us/no.voc deleted file mode 100644 index 51066f65dc09..000000000000 --- a/mycroft/res/text/en-us/no.voc +++ /dev/null @@ -1,4 +0,0 @@ -no -nope -nah -negative \ No newline at end of file diff --git a/mycroft/res/text/en-us/noise_words.list b/mycroft/res/text/en-us/noise_words.list deleted file mode 100644 index 85cf69de386b..000000000000 --- a/mycroft/res/text/en-us/noise_words.list +++ /dev/null @@ -1,30 +0,0 @@ -where -what's -which -them -they -when -what -that -will -from -that -also -who -how -did -and -but -the -too -why -for -is -it -do -or -to -of -a - - diff --git a/mycroft/res/text/en-us/not connected to the internet.dialog b/mycroft/res/text/en-us/not connected to the internet.dialog deleted file mode 100644 index 3463642581e8..000000000000 --- a/mycroft/res/text/en-us/not connected to the internet.dialog +++ /dev/null @@ -1,5 +0,0 @@ -It seems I'm not connected to the Internet, please check your network connection. -I don't seem to be connected to the internet, please check your network connection. -I can't reach the internet right now, please check your network connection. -I'm unable to reach the internet, please check your network connection. -I'm having trouble reaching the internet right now, please check your network connection. \ No newline at end of file diff --git a/mycroft/res/text/en-us/not.loaded.dialog b/mycroft/res/text/en-us/not.loaded.dialog deleted file mode 100644 index bcc81c44bffc..000000000000 --- a/mycroft/res/text/en-us/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Please wait a moment as I finish booting up. \ No newline at end of file diff --git a/mycroft/res/text/en-us/or.word b/mycroft/res/text/en-us/or.word deleted file mode 100644 index c4fced5f4b36..000000000000 --- a/mycroft/res/text/en-us/or.word +++ /dev/null @@ -1 +0,0 @@ -or \ No newline at end of file diff --git a/mycroft/res/text/en-us/phonetic_spellings.txt b/mycroft/res/text/en-us/phonetic_spellings.txt deleted file mode 100644 index 80f1212ce777..000000000000 --- a/mycroft/res/text/en-us/phonetic_spellings.txt +++ /dev/null @@ -1,7 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. -mycroftai: mycroft A.I. -spotify: spot-ify -corgi: core-gee -ip: eye pea -wikipedia: wiki peedia \ No newline at end of file diff --git a/mycroft/res/text/en-us/reset to factory defaults.dialog b/mycroft/res/text/en-us/reset to factory defaults.dialog deleted file mode 100644 index 5586e3202461..000000000000 --- a/mycroft/res/text/en-us/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -I have been reset to factory defaults. diff --git a/mycroft/res/text/en-us/second.word b/mycroft/res/text/en-us/second.word deleted file mode 100644 index 2147e4188951..000000000000 --- a/mycroft/res/text/en-us/second.word +++ /dev/null @@ -1 +0,0 @@ -second \ No newline at end of file diff --git a/mycroft/res/text/en-us/seconds.word b/mycroft/res/text/en-us/seconds.word deleted file mode 100644 index 729866f9b412..000000000000 --- a/mycroft/res/text/en-us/seconds.word +++ /dev/null @@ -1 +0,0 @@ -seconds \ No newline at end of file diff --git a/mycroft/res/text/en-us/skill.error.dialog b/mycroft/res/text/en-us/skill.error.dialog deleted file mode 100644 index 29728856a4c6..000000000000 --- a/mycroft/res/text/en-us/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -An error occurred while processing a request in {{skill}} \ No newline at end of file diff --git a/mycroft/res/text/en-us/skills updated.dialog b/mycroft/res/text/en-us/skills updated.dialog deleted file mode 100644 index a09fb174790c..000000000000 --- a/mycroft/res/text/en-us/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -I'm up to date now -Skills Updated. I'm ready to help you. diff --git a/mycroft/res/text/en-us/sorry I couldn't install default skills.dialog b/mycroft/res/text/en-us/sorry I couldn't install default skills.dialog deleted file mode 100644 index 183c8e346d6f..000000000000 --- a/mycroft/res/text/en-us/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -an error occurred while updating skills diff --git a/mycroft/res/text/en-us/ssh disabled.dialog b/mycroft/res/text/en-us/ssh disabled.dialog deleted file mode 100644 index 5f96c3d0fcda..000000000000 --- a/mycroft/res/text/en-us/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH login has been disabled \ No newline at end of file diff --git a/mycroft/res/text/en-us/ssh enabled.dialog b/mycroft/res/text/en-us/ssh enabled.dialog deleted file mode 100644 index 33f1dcdd5b63..000000000000 --- a/mycroft/res/text/en-us/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH logins are now allowed diff --git a/mycroft/res/text/en-us/time.changed.reboot.dialog b/mycroft/res/text/en-us/time.changed.reboot.dialog deleted file mode 100644 index 5393c73846a3..000000000000 --- a/mycroft/res/text/en-us/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -I need to restart after synchronizing my clock with the internet, be right back. \ No newline at end of file diff --git a/mycroft/res/text/en-us/yes.voc b/mycroft/res/text/en-us/yes.voc deleted file mode 100644 index 4e786148b3bf..000000000000 --- a/mycroft/res/text/en-us/yes.voc +++ /dev/null @@ -1,8 +0,0 @@ -yes -yeah -yep -sure -please -confirm -confirmed -affirmative diff --git a/mycroft/res/text/es-es/backend.down.dialog b/mycroft/res/text/es-es/backend.down.dialog deleted file mode 100644 index f8d28243db46..000000000000 --- a/mycroft/res/text/es-es/backend.down.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Tengo problemas para comunicarme con los servidores de Mycroft. Dame unos minutos antes de intentar hablarme, por favor. -Tengo problemas para comunicarme con los servidores de Mycroft. Espera unos minutos antes de intentar hablarme, por favor. -Me parece que no puedo conectarme a los servidores de Mycroft. Dame unos minutos antes de intentar hablarme, por favor. -Me parece que no puedo conectarme a los servidores de Mycroft. Espera unos minutos antes de intentar hablarme, por favor. diff --git a/mycroft/res/text/es-es/cancel.voc b/mycroft/res/text/es-es/cancel.voc deleted file mode 100644 index 7203e98580f5..000000000000 --- a/mycroft/res/text/es-es/cancel.voc +++ /dev/null @@ -1,4 +0,0 @@ -cancela -olvídalo -da igual -no importa diff --git a/mycroft/res/text/es-es/checking for updates.dialog b/mycroft/res/text/es-es/checking for updates.dialog deleted file mode 100644 index 4bf2c0d4c90c..000000000000 --- a/mycroft/res/text/es-es/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Buscando actualizaciones -Un momento mientras me actualizo diff --git a/mycroft/res/text/es-es/common_play.voc b/mycroft/res/text/es-es/common_play.voc deleted file mode 100644 index e19a2c27b03b..000000000000 --- a/mycroft/res/text/es-es/common_play.voc +++ /dev/null @@ -1,10 +0,0 @@ -tocar -tocando -reproducir -iniciar -empezar -pón -pon -escucha -escuchar -OCP diff --git a/mycroft/res/text/es-es/day.word b/mycroft/res/text/es-es/day.word deleted file mode 100644 index 1f65386bd7c2..000000000000 --- a/mycroft/res/text/es-es/day.word +++ /dev/null @@ -1 +0,0 @@ -día diff --git a/mycroft/res/text/es-es/days.word b/mycroft/res/text/es-es/days.word deleted file mode 100644 index 3b1c6763c92c..000000000000 --- a/mycroft/res/text/es-es/days.word +++ /dev/null @@ -1 +0,0 @@ -días diff --git a/mycroft/res/text/es-es/hour.word b/mycroft/res/text/es-es/hour.word deleted file mode 100644 index cb26009f4b7b..000000000000 --- a/mycroft/res/text/es-es/hour.word +++ /dev/null @@ -1 +0,0 @@ -hora diff --git a/mycroft/res/text/es-es/hours.word b/mycroft/res/text/es-es/hours.word deleted file mode 100644 index 49f065dab61e..000000000000 --- a/mycroft/res/text/es-es/hours.word +++ /dev/null @@ -1 +0,0 @@ -horas diff --git a/mycroft/res/text/es-es/i didn't catch that.dialog b/mycroft/res/text/es-es/i didn't catch that.dialog deleted file mode 100644 index 24e08c2b2b4c..000000000000 --- a/mycroft/res/text/es-es/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -No entendí lo que dijiste, lo siento -Perdóname, no te entendí -¿Podrías repetir eso? -¿Puedes por favor repetirlo? diff --git a/mycroft/res/text/es-es/last.voc b/mycroft/res/text/es-es/last.voc deleted file mode 100644 index dc873518cadb..000000000000 --- a/mycroft/res/text/es-es/last.voc +++ /dev/null @@ -1,12 +0,0 @@ -último -última -últimos -últimas -ùltimo -ùltima -ùltimos -ùltimas -ultimo -ultima -ultimos -ultimas diff --git a/mycroft/res/text/es-es/learning disabled.dialog b/mycroft/res/text/es-es/learning disabled.dialog deleted file mode 100644 index e5b3cb46a803..000000000000 --- a/mycroft/res/text/es-es/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Nuestras interacciones no se enviarán más a Mycroft AI. diff --git a/mycroft/res/text/es-es/learning enabled.dialog b/mycroft/res/text/es-es/learning enabled.dialog deleted file mode 100644 index 8044cd341669..000000000000 --- a/mycroft/res/text/es-es/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -A partir de ahora subiré datos de nuestras interacciones a Mycroft AI para hacerme más inteligente. Por ahora esto incluye tus grabaciones diciendo mi nombre para activarme diff --git a/mycroft/res/text/es-es/message_rebooting.dialog b/mycroft/res/text/es-es/message_rebooting.dialog deleted file mode 100644 index 9f29ae8d5f76..000000000000 --- a/mycroft/res/text/es-es/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -REINICIANDO... diff --git a/mycroft/res/text/es-es/message_synching.clock.dialog b/mycroft/res/text/es-es/message_synching.clock.dialog deleted file mode 100644 index 022ba5fff1d8..000000000000 --- a/mycroft/res/text/es-es/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SINCRONIZANDO < < < diff --git a/mycroft/res/text/es-es/message_updating.dialog b/mycroft/res/text/es-es/message_updating.dialog deleted file mode 100644 index d6ce6201092d..000000000000 --- a/mycroft/res/text/es-es/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < ACTUALIZANDO < < < diff --git a/mycroft/res/text/es-es/minute.word b/mycroft/res/text/es-es/minute.word deleted file mode 100644 index 9b63882612ee..000000000000 --- a/mycroft/res/text/es-es/minute.word +++ /dev/null @@ -1 +0,0 @@ -minuto diff --git a/mycroft/res/text/es-es/minutes.word b/mycroft/res/text/es-es/minutes.word deleted file mode 100644 index 5028337e7b9f..000000000000 --- a/mycroft/res/text/es-es/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minutos diff --git a/mycroft/res/text/es-es/mycroft.intro.dialog b/mycroft/res/text/es-es/mycroft.intro.dialog deleted file mode 100644 index ad2644679587..000000000000 --- a/mycroft/res/text/es-es/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Hola, soy Mycroft, tu nuevo asistente. Para ayudarte debo conectarme a internet. Puedes conectarme un cable de red o utilizar wifi. Sigue estas instrucciones para configurar wifi: diff --git a/mycroft/res/text/es-es/no.voc b/mycroft/res/text/es-es/no.voc deleted file mode 100644 index 553613fbbaec..000000000000 --- a/mycroft/res/text/es-es/no.voc +++ /dev/null @@ -1,4 +0,0 @@ -no -nop -nah -negativo diff --git a/mycroft/res/text/es-es/not connected to the internet.dialog b/mycroft/res/text/es-es/not connected to the internet.dialog deleted file mode 100644 index 4ef06f9b5f5a..000000000000 --- a/mycroft/res/text/es-es/not connected to the internet.dialog +++ /dev/null @@ -1,5 +0,0 @@ -Parece que no estoy conectado a internet, por favor comprueba tu conexión de red. -Creo que no estoy conectado a internet. ¿Puedes comprobar la conexión? -No puedo acceder a internet en estos momentos, por favor comprueba la conexión de red. -No consigo conectarme a internet, ¿puedes comprobar la conexión? -No puedo conectarme a internet, por favor ¿puedes comprobar la conexión? diff --git a/mycroft/res/text/es-es/not.loaded.dialog b/mycroft/res/text/es-es/not.loaded.dialog deleted file mode 100644 index 7aef088447c0..000000000000 --- a/mycroft/res/text/es-es/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Espera un momento mientras acabo de iniciarme por favor diff --git a/mycroft/res/text/es-es/phonetic_spellings.txt b/mycroft/res/text/es-es/phonetic_spellings.txt deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/mycroft/res/text/es-es/reset to factory defaults.dialog b/mycroft/res/text/es-es/reset to factory defaults.dialog deleted file mode 100644 index a9e9c62b6459..000000000000 --- a/mycroft/res/text/es-es/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -He sido restaurado a la configuración de fábrica. diff --git a/mycroft/res/text/es-es/second.word b/mycroft/res/text/es-es/second.word deleted file mode 100644 index 9c41ac63859b..000000000000 --- a/mycroft/res/text/es-es/second.word +++ /dev/null @@ -1 +0,0 @@ -segundo diff --git a/mycroft/res/text/es-es/seconds.word b/mycroft/res/text/es-es/seconds.word deleted file mode 100644 index f9955ce39337..000000000000 --- a/mycroft/res/text/es-es/seconds.word +++ /dev/null @@ -1 +0,0 @@ -segundos diff --git a/mycroft/res/text/es-es/skill.error.dialog b/mycroft/res/text/es-es/skill.error.dialog deleted file mode 100644 index 3bb9a935d9f4..000000000000 --- a/mycroft/res/text/es-es/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -Sucedió un error al procesar una petición de {{skill}} diff --git a/mycroft/res/text/es-es/skills updated.dialog b/mycroft/res/text/es-es/skills updated.dialog deleted file mode 100644 index 809b8aabe18d..000000000000 --- a/mycroft/res/text/es-es/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Ya estoy actualizado -He actualizado mis habilidades. Estoy listo para ayudarte. diff --git a/mycroft/res/text/es-es/sorry I couldn't install default skills.dialog b/mycroft/res/text/es-es/sorry I couldn't install default skills.dialog deleted file mode 100644 index 7c15bafc5c3d..000000000000 --- a/mycroft/res/text/es-es/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -Sucedió un error mientras actualizaba mis habilidades diff --git a/mycroft/res/text/es-es/ssh disabled.dialog b/mycroft/res/text/es-es/ssh disabled.dialog deleted file mode 100644 index e6f74827e3cd..000000000000 --- a/mycroft/res/text/es-es/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -El inicio de sesión por SSH ha sido desactivado diff --git a/mycroft/res/text/es-es/ssh enabled.dialog b/mycroft/res/text/es-es/ssh enabled.dialog deleted file mode 100644 index 4984a428fd91..000000000000 --- a/mycroft/res/text/es-es/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Permito el inicio de sesión por SSH a partir de ahora diff --git a/mycroft/res/text/es-es/time.changed.reboot.dialog b/mycroft/res/text/es-es/time.changed.reboot.dialog deleted file mode 100644 index ec812f78b21d..000000000000 --- a/mycroft/res/text/es-es/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Debo reiniciarme después de sincronizar mi reloj con internet, ahora vuelvo. diff --git a/mycroft/res/text/es-es/yes.voc b/mycroft/res/text/es-es/yes.voc deleted file mode 100644 index 559fb4734599..000000000000 --- a/mycroft/res/text/es-es/yes.voc +++ /dev/null @@ -1,5 +0,0 @@ -sí -sí -sí -por supuesto -por favor diff --git a/mycroft/res/text/eu-eu/and.word b/mycroft/res/text/eu-eu/and.word deleted file mode 100644 index 53a0c069fbe4..000000000000 --- a/mycroft/res/text/eu-eu/and.word +++ /dev/null @@ -1 +0,0 @@ -eta \ No newline at end of file diff --git a/mycroft/res/text/eu-eu/backend.down.dialog b/mycroft/res/text/eu-eu/backend.down.dialog deleted file mode 100644 index d6aa696a64e9..000000000000 --- a/mycroft/res/text/eu-eu/backend.down.dialog +++ /dev/null @@ -1 +0,0 @@ -Arazoak ditut Mycroft zerbitzariekin konektatzeko. Itxaron minutu batzuk, mesedez. diff --git a/mycroft/res/text/eu-eu/cancel.voc b/mycroft/res/text/eu-eu/cancel.voc deleted file mode 100644 index 951a8b75dd54..000000000000 --- a/mycroft/res/text/eu-eu/cancel.voc +++ /dev/null @@ -1,4 +0,0 @@ -ezeztatu -utzi (ezazu|) -ahaztu (ezazu|) -berdin (da|dio) diff --git a/mycroft/res/text/eu-eu/checking for updates.dialog b/mycroft/res/text/eu-eu/checking for updates.dialog deleted file mode 100644 index ec71b1c4b38b..000000000000 --- a/mycroft/res/text/eu-eu/checking for updates.dialog +++ /dev/null @@ -1 +0,0 @@ -Eguneraketen bila, itxaron une bat mesedez. diff --git a/mycroft/res/text/eu-eu/day.word b/mycroft/res/text/eu-eu/day.word deleted file mode 100644 index 4a3fb4535ce9..000000000000 --- a/mycroft/res/text/eu-eu/day.word +++ /dev/null @@ -1 +0,0 @@ -egun diff --git a/mycroft/res/text/eu-eu/days.word b/mycroft/res/text/eu-eu/days.word deleted file mode 100644 index 4a3fb4535ce9..000000000000 --- a/mycroft/res/text/eu-eu/days.word +++ /dev/null @@ -1 +0,0 @@ -egun diff --git a/mycroft/res/text/eu-eu/hour.word b/mycroft/res/text/eu-eu/hour.word deleted file mode 100644 index 649aec07abff..000000000000 --- a/mycroft/res/text/eu-eu/hour.word +++ /dev/null @@ -1 +0,0 @@ -ordu diff --git a/mycroft/res/text/eu-eu/hours.word b/mycroft/res/text/eu-eu/hours.word deleted file mode 100644 index 649aec07abff..000000000000 --- a/mycroft/res/text/eu-eu/hours.word +++ /dev/null @@ -1 +0,0 @@ -ordu diff --git a/mycroft/res/text/eu-eu/i didn't catch that.dialog b/mycroft/res/text/eu-eu/i didn't catch that.dialog deleted file mode 100644 index 4bf72b10ebd3..000000000000 --- a/mycroft/res/text/eu-eu/i didn't catch that.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Ez dut ulertu esan duzuna, barkatu. -Errepikatuko didazu, mesedez? diff --git a/mycroft/res/text/eu-eu/last.voc b/mycroft/res/text/eu-eu/last.voc deleted file mode 100644 index f5d9bc3c6b50..000000000000 --- a/mycroft/res/text/eu-eu/last.voc +++ /dev/null @@ -1,2 +0,0 @@ -azken aukera -azkena \ No newline at end of file diff --git a/mycroft/res/text/eu-eu/learning disabled.dialog b/mycroft/res/text/eu-eu/learning disabled.dialog deleted file mode 100644 index bb04c4643c32..000000000000 --- a/mycroft/res/text/eu-eu/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Gure interakzioa ez da bidaliko Mycroft AI-ra. diff --git a/mycroft/res/text/eu-eu/learning enabled.dialog b/mycroft/res/text/eu-eu/learning enabled.dialog deleted file mode 100644 index b0fa1a94d9e0..000000000000 --- a/mycroft/res/text/eu-eu/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Hemendik aurrera gure interakzioak igoko ditut MycroftAI-ra, zerbitzua hobetze aldera. Oraingoz zu nire izena esaten grabazioa igoko da. diff --git a/mycroft/res/text/eu-eu/message_loading.skills.dialog b/mycroft/res/text/eu-eu/message_loading.skills.dialog deleted file mode 100644 index ea479f7420e4..000000000000 --- a/mycroft/res/text/eu-eu/message_loading.skills.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < KARGATZEN < < < \ No newline at end of file diff --git a/mycroft/res/text/eu-eu/message_rebooting.dialog b/mycroft/res/text/eu-eu/message_rebooting.dialog deleted file mode 100644 index ccfd7356ccb9..000000000000 --- a/mycroft/res/text/eu-eu/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -BERRABIARAZTEN... diff --git a/mycroft/res/text/eu-eu/message_synching.clock.dialog b/mycroft/res/text/eu-eu/message_synching.clock.dialog deleted file mode 100644 index 31e5031014d6..000000000000 --- a/mycroft/res/text/eu-eu/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SINKRONIZATZEN < < < diff --git a/mycroft/res/text/eu-eu/message_updating.dialog b/mycroft/res/text/eu-eu/message_updating.dialog deleted file mode 100644 index 716e7fde5658..000000000000 --- a/mycroft/res/text/eu-eu/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < EGUNERATZEN < < < diff --git a/mycroft/res/text/eu-eu/minute.word b/mycroft/res/text/eu-eu/minute.word deleted file mode 100644 index c4bda7da7abb..000000000000 --- a/mycroft/res/text/eu-eu/minute.word +++ /dev/null @@ -1 +0,0 @@ -minutu diff --git a/mycroft/res/text/eu-eu/minutes.word b/mycroft/res/text/eu-eu/minutes.word deleted file mode 100644 index c4bda7da7abb..000000000000 --- a/mycroft/res/text/eu-eu/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minutu diff --git a/mycroft/res/text/eu-eu/mycroft.intro.dialog b/mycroft/res/text/eu-eu/mycroft.intro.dialog deleted file mode 100644 index f928a5e30770..000000000000 --- a/mycroft/res/text/eu-eu/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Kaixo, Mycroft naiz, zure laguntzaile berria. Lagundu ahal izateko internetera konexioa behar dut. Kable edo wifi bidez konektatu naiteke. Jarraitu ondorengo pausuak wifia konfiguratzeko: diff --git a/mycroft/res/text/eu-eu/no.voc b/mycroft/res/text/eu-eu/no.voc deleted file mode 100644 index a7e864e7e6a5..000000000000 --- a/mycroft/res/text/eu-eu/no.voc +++ /dev/null @@ -1 +0,0 @@ -ez \ No newline at end of file diff --git a/mycroft/res/text/eu-eu/not connected to the internet.dialog b/mycroft/res/text/eu-eu/not connected to the internet.dialog deleted file mode 100644 index deb8022ac14c..000000000000 --- a/mycroft/res/text/eu-eu/not connected to the internet.dialog +++ /dev/null @@ -1 +0,0 @@ -Badirudi internetera konexiorik ez dudala. Mesedez, berrikusi sare konexioa. diff --git a/mycroft/res/text/eu-eu/not.loaded.dialog b/mycroft/res/text/eu-eu/not.loaded.dialog deleted file mode 100644 index c5185e1c43b1..000000000000 --- a/mycroft/res/text/eu-eu/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Itxoin une bat abiarazten naizen bitartean diff --git a/mycroft/res/text/eu-eu/or.word b/mycroft/res/text/eu-eu/or.word deleted file mode 100644 index e99a7b9a1776..000000000000 --- a/mycroft/res/text/eu-eu/or.word +++ /dev/null @@ -1 +0,0 @@ -edo \ No newline at end of file diff --git a/mycroft/res/text/eu-eu/phonetic_spellings.txt b/mycroft/res/text/eu-eu/phonetic_spellings.txt deleted file mode 100644 index 8c9ca0f95fd3..000000000000 --- a/mycroft/res/text/eu-eu/phonetic_spellings.txt +++ /dev/null @@ -1 +0,0 @@ -mycroft: maikroft \ No newline at end of file diff --git a/mycroft/res/text/eu-eu/reset to factory defaults.dialog b/mycroft/res/text/eu-eu/reset to factory defaults.dialog deleted file mode 100644 index efe69059d92d..000000000000 --- a/mycroft/res/text/eu-eu/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Berezko fabrika konfiguraziora itzuli naiz. diff --git a/mycroft/res/text/eu-eu/second.word b/mycroft/res/text/eu-eu/second.word deleted file mode 100644 index 9c41ac63859b..000000000000 --- a/mycroft/res/text/eu-eu/second.word +++ /dev/null @@ -1 +0,0 @@ -segundo diff --git a/mycroft/res/text/eu-eu/seconds.word b/mycroft/res/text/eu-eu/seconds.word deleted file mode 100644 index 9c41ac63859b..000000000000 --- a/mycroft/res/text/eu-eu/seconds.word +++ /dev/null @@ -1 +0,0 @@ -segundo diff --git a/mycroft/res/text/eu-eu/skill.error.dialog b/mycroft/res/text/eu-eu/skill.error.dialog deleted file mode 100644 index 2a61d1bbaaf0..000000000000 --- a/mycroft/res/text/eu-eu/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -{{skill}} gaitasunari egindako eskaria prozesatzean arazoa izan da. diff --git a/mycroft/res/text/eu-eu/skills updated.dialog b/mycroft/res/text/eu-eu/skills updated.dialog deleted file mode 100644 index 89624a56e364..000000000000 --- a/mycroft/res/text/eu-eu/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Eguneratu naiz. -Trebetasunak eguneratuta. Laguntzeko prest nago. diff --git a/mycroft/res/text/eu-eu/sorry I couldn't install default skills.dialog b/mycroft/res/text/eu-eu/sorry I couldn't install default skills.dialog deleted file mode 100644 index d309ebb7d8b6..000000000000 --- a/mycroft/res/text/eu-eu/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -Akatsen bat izan da trebetasunak eguneratzerakoan diff --git a/mycroft/res/text/eu-eu/ssh disabled.dialog b/mycroft/res/text/eu-eu/ssh disabled.dialog deleted file mode 100644 index 3688fb788f6f..000000000000 --- a/mycroft/res/text/eu-eu/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH bidezko saio hasiera desaktibatu da diff --git a/mycroft/res/text/eu-eu/ssh enabled.dialog b/mycroft/res/text/eu-eu/ssh enabled.dialog deleted file mode 100644 index 91635d24ed2a..000000000000 --- a/mycroft/res/text/eu-eu/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH bidezko saio hasiera aktibatu da diff --git a/mycroft/res/text/eu-eu/time.changed.reboot.dialog b/mycroft/res/text/eu-eu/time.changed.reboot.dialog deleted file mode 100644 index 893daf1300f5..000000000000 --- a/mycroft/res/text/eu-eu/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Nire ordularia internetekin sikronizatu ostean berrabiarazi behar naiz, oraintxe nator. \ No newline at end of file diff --git a/mycroft/res/text/eu-eu/yes.voc b/mycroft/res/text/eu-eu/yes.voc deleted file mode 100644 index 1554da56992c..000000000000 --- a/mycroft/res/text/eu-eu/yes.voc +++ /dev/null @@ -1,5 +0,0 @@ -bai -noski -noski baietz -bale -ados \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/and.word b/mycroft/res/text/fa-ir/and.word deleted file mode 100644 index 438fc2d5c604..000000000000 --- a/mycroft/res/text/fa-ir/and.word +++ /dev/null @@ -1 +0,0 @@ -و \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/backend.down.dialog b/mycroft/res/text/fa-ir/backend.down.dialog deleted file mode 100644 index f8a3ed6bfe97..000000000000 --- a/mycroft/res/text/fa-ir/backend.down.dialog +++ /dev/null @@ -1,4 +0,0 @@ -من در برقراریِ ارتباط با سِروِر مشکلاتی دارم. لطفا به من چند دقیقه زمان بده قبل از این که با من حرف بزنی. -من در برقراریِ ارتباط با سِروِر مشکلاتی دارم. لطفا چند دقیقه صبر کن قبل از این که با من حرف بزنی. -به نظر می رِسه که نمی تونم به سِروِر وصل شم. لطفا به من چند دقیقه زمان بده قبل از این که با من حرف بزنی. -به نظر می رِسه که نمی تونم به سِروِر وصل شم. لطفا چند دقیقه صبر کن قبل از این که با من حرف بزنی. \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/cancel.voc b/mycroft/res/text/fa-ir/cancel.voc deleted file mode 100644 index 8c2cd7d017d9..000000000000 --- a/mycroft/res/text/fa-ir/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -کنسله -بیخیال -فراموشِش کن diff --git a/mycroft/res/text/fa-ir/checking for updates.dialog b/mycroft/res/text/fa-ir/checking for updates.dialog deleted file mode 100644 index a5c04f1703b4..000000000000 --- a/mycroft/res/text/fa-ir/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -چک کردنِ آپدیت ها -یه لحظه صبر کن تا خودمو آپدیت کنم diff --git a/mycroft/res/text/fa-ir/day.word b/mycroft/res/text/fa-ir/day.word deleted file mode 100644 index dfc15b79dda3..000000000000 --- a/mycroft/res/text/fa-ir/day.word +++ /dev/null @@ -1 +0,0 @@ -روز \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/days.word b/mycroft/res/text/fa-ir/days.word deleted file mode 100644 index 24e107a87799..000000000000 --- a/mycroft/res/text/fa-ir/days.word +++ /dev/null @@ -1 +0,0 @@ -روز ها \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/hour.word b/mycroft/res/text/fa-ir/hour.word deleted file mode 100644 index 3f2b7b1625b0..000000000000 --- a/mycroft/res/text/fa-ir/hour.word +++ /dev/null @@ -1 +0,0 @@ -ساعت \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/hours.word b/mycroft/res/text/fa-ir/hours.word deleted file mode 100644 index 38aa65010dad..000000000000 --- a/mycroft/res/text/fa-ir/hours.word +++ /dev/null @@ -1 +0,0 @@ -ساعت ها \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/i didn't catch that.dialog b/mycroft/res/text/fa-ir/i didn't catch that.dialog deleted file mode 100644 index 505ebdad5160..000000000000 --- a/mycroft/res/text/fa-ir/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -ببخشید، متوجه نشدم -می ترسم متوجه نشده باشم -می تونی دوباره بگی؟ -می تونی تکرارش کنی؟ diff --git a/mycroft/res/text/fa-ir/last.voc b/mycroft/res/text/fa-ir/last.voc deleted file mode 100644 index d7c93164e55f..000000000000 --- a/mycroft/res/text/fa-ir/last.voc +++ /dev/null @@ -1,3 +0,0 @@ -موردِ آخر -گزینه ی آخر -آخری diff --git a/mycroft/res/text/fa-ir/learning disabled.dialog b/mycroft/res/text/fa-ir/learning disabled.dialog deleted file mode 100644 index f598d45fab55..000000000000 --- a/mycroft/res/text/fa-ir/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -اطلاعات دیگه به شرکتِ مایکرافت فرستاده نمی شِه. diff --git a/mycroft/res/text/fa-ir/learning enabled.dialog b/mycroft/res/text/fa-ir/learning enabled.dialog deleted file mode 100644 index 9a74482831d6..000000000000 --- a/mycroft/res/text/fa-ir/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -از این به بعد من اطلاعاتِ تعاملی رو به شرکتِ مایکرافت می فرستم تا باهوش تر بشم. در حالِ حاضر این اطلاعات شامل کلمه بیدار شدن می‌شِه. diff --git a/mycroft/res/text/fa-ir/message_loading.skills.dialog b/mycroft/res/text/fa-ir/message_loading.skills.dialog deleted file mode 100644 index 24aa713302bc..000000000000 --- a/mycroft/res/text/fa-ir/message_loading.skills.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < بارگیری < < < \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/message_rebooting.dialog b/mycroft/res/text/fa-ir/message_rebooting.dialog deleted file mode 100644 index 4d5303543dea..000000000000 --- a/mycroft/res/text/fa-ir/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -در حال ری استارت شدن... \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/message_synching.clock.dialog b/mycroft/res/text/fa-ir/message_synching.clock.dialog deleted file mode 100644 index b140f1b6316f..000000000000 --- a/mycroft/res/text/fa-ir/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < همگام سازی < < < \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/message_updating.dialog b/mycroft/res/text/fa-ir/message_updating.dialog deleted file mode 100644 index aca660696cb9..000000000000 --- a/mycroft/res/text/fa-ir/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < به روز رسانی < < < \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/minute.word b/mycroft/res/text/fa-ir/minute.word deleted file mode 100644 index 1e9a05d81d7e..000000000000 --- a/mycroft/res/text/fa-ir/minute.word +++ /dev/null @@ -1 +0,0 @@ -دقیقه \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/minutes.word b/mycroft/res/text/fa-ir/minutes.word deleted file mode 100644 index 63ff81502e52..000000000000 --- a/mycroft/res/text/fa-ir/minutes.word +++ /dev/null @@ -1 +0,0 @@ -دقیقه ها \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/mycroft.intro.dialog b/mycroft/res/text/fa-ir/mycroft.intro.dialog deleted file mode 100644 index 8f4884920966..000000000000 --- a/mycroft/res/text/fa-ir/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -سلام من مایکرافت هستم، دستیارِ جدیدِ شما. برای کمک به شما من نیاز دارم که به اینترنت متصل بشم. شما می تونید که کابلِ شبکه رو به من وصل کنید یا از وای فای استفاده کنید. برای استفاده از وای فای این دستور العمل رو دنبال کنید: \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/no.voc b/mycroft/res/text/fa-ir/no.voc deleted file mode 100644 index 531017a2d648..000000000000 --- a/mycroft/res/text/fa-ir/no.voc +++ /dev/null @@ -1,4 +0,0 @@ -نه -خیر -نوچ -منفی \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/not connected to the internet.dialog b/mycroft/res/text/fa-ir/not connected to the internet.dialog deleted file mode 100644 index c1b69e653f6c..000000000000 --- a/mycroft/res/text/fa-ir/not connected to the internet.dialog +++ /dev/null @@ -1,4 +0,0 @@ -من نمی تونم به اینترنت وصل شم. لطفا اتصالِ اینترنت رو بررسی کن. -من نمی تونم به اینترنت وصل شم. لطفا اتصالِ اینترنت رو بررسی کن. -من نمی تونم به اینترنت وصل شم. لطفا اتصالِ اینترنت رو بررسی کن. -من نمی تونم به اینترنت وصل شم. لطفا اتصالِ اینترنت رو بررسی کن. diff --git a/mycroft/res/text/fa-ir/not.loaded.dialog b/mycroft/res/text/fa-ir/not.loaded.dialog deleted file mode 100644 index 4beb1398d0e8..000000000000 --- a/mycroft/res/text/fa-ir/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -چند لحظه صبر کن تا کاملا روشن بشم. diff --git a/mycroft/res/text/fa-ir/or.word b/mycroft/res/text/fa-ir/or.word deleted file mode 100644 index aa43ee0c9bf9..000000000000 --- a/mycroft/res/text/fa-ir/or.word +++ /dev/null @@ -1 +0,0 @@ -یا \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/phonetic_spellings.txt b/mycroft/res/text/fa-ir/phonetic_spellings.txt deleted file mode 100644 index dfa3cb9a674e..000000000000 --- a/mycroft/res/text/fa-ir/phonetic_spellings.txt +++ /dev/null @@ -1,5 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. -mycroftai: mycroft A.I. -spotify: spot-ify -corgi: core-gee diff --git a/mycroft/res/text/fa-ir/reset to factory defaults.dialog b/mycroft/res/text/fa-ir/reset to factory defaults.dialog deleted file mode 100644 index 82ebde4e4fdf..000000000000 --- a/mycroft/res/text/fa-ir/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -من به تنظیماتِ کارخانه برگشتم. diff --git a/mycroft/res/text/fa-ir/second.word b/mycroft/res/text/fa-ir/second.word deleted file mode 100644 index 3d2bee65fc3c..000000000000 --- a/mycroft/res/text/fa-ir/second.word +++ /dev/null @@ -1 +0,0 @@ -ثانیه \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/seconds.word b/mycroft/res/text/fa-ir/seconds.word deleted file mode 100644 index a79aaf778679..000000000000 --- a/mycroft/res/text/fa-ir/seconds.word +++ /dev/null @@ -1 +0,0 @@ -ثانیه ها \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/skill.error.dialog b/mycroft/res/text/fa-ir/skill.error.dialog deleted file mode 100644 index 0c410d93cd4e..000000000000 --- a/mycroft/res/text/fa-ir/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -خطایی هنگامِ پردازشِ درخواستی برای {{skill}} رخ داد. \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/skills updated.dialog b/mycroft/res/text/fa-ir/skills updated.dialog deleted file mode 100644 index 6c51a3e0db33..000000000000 --- a/mycroft/res/text/fa-ir/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -من به روز شدم. -مهارتم به روز شد. آماده ام که بِهِت کمک کنم. diff --git a/mycroft/res/text/fa-ir/sorry I couldn't install default skills.dialog b/mycroft/res/text/fa-ir/sorry I couldn't install default skills.dialog deleted file mode 100644 index 3aea94b94e68..000000000000 --- a/mycroft/res/text/fa-ir/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -خطایی هنگامِ به روز رسانیِ مهارت رخ داد. diff --git a/mycroft/res/text/fa-ir/ssh disabled.dialog b/mycroft/res/text/fa-ir/ssh disabled.dialog deleted file mode 100644 index 106c93761f4f..000000000000 --- a/mycroft/res/text/fa-ir/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -اس اس اچ غیرفعال شد. \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/ssh enabled.dialog b/mycroft/res/text/fa-ir/ssh enabled.dialog deleted file mode 100644 index a0623af49abe..000000000000 --- a/mycroft/res/text/fa-ir/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -اس اس اچ فعال شد. \ No newline at end of file diff --git a/mycroft/res/text/fa-ir/time.changed.reboot.dialog b/mycroft/res/text/fa-ir/time.changed.reboot.dialog deleted file mode 100644 index cb965ebb0a42..000000000000 --- a/mycroft/res/text/fa-ir/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -من نیاز دارم که ری استارت بشم بعدِ این که ساعتم با اینترنت همگام شد. منتظر باش. diff --git a/mycroft/res/text/fa-ir/yes.voc b/mycroft/res/text/fa-ir/yes.voc deleted file mode 100644 index 6069193e7012..000000000000 --- a/mycroft/res/text/fa-ir/yes.voc +++ /dev/null @@ -1,5 +0,0 @@ -بله -چشم -حتما -انجام می شه -اطاعت می شه diff --git a/mycroft/res/text/fr-fr/cancel.voc b/mycroft/res/text/fr-fr/cancel.voc deleted file mode 100644 index d54376687fc9..000000000000 --- a/mycroft/res/text/fr-fr/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -annule tout -oublie ça -laisse tomber diff --git a/mycroft/res/text/fr-fr/checking for updates.dialog b/mycroft/res/text/fr-fr/checking for updates.dialog deleted file mode 100644 index 1a03facb4202..000000000000 --- a/mycroft/res/text/fr-fr/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Recherche de mises à jour -Un instant, je me mets à jour diff --git a/mycroft/res/text/fr-fr/common_play.voc b/mycroft/res/text/fr-fr/common_play.voc deleted file mode 100644 index d761264e53f2..000000000000 --- a/mycroft/res/text/fr-fr/common_play.voc +++ /dev/null @@ -1,4 +0,0 @@ -jouer -joues -jouiez -OCP diff --git a/mycroft/res/text/fr-fr/day.word b/mycroft/res/text/fr-fr/day.word deleted file mode 100644 index 3e1393b847d8..000000000000 --- a/mycroft/res/text/fr-fr/day.word +++ /dev/null @@ -1 +0,0 @@ -jour diff --git a/mycroft/res/text/fr-fr/days.word b/mycroft/res/text/fr-fr/days.word deleted file mode 100644 index 6a0300aa103a..000000000000 --- a/mycroft/res/text/fr-fr/days.word +++ /dev/null @@ -1 +0,0 @@ -jours diff --git a/mycroft/res/text/fr-fr/hour.word b/mycroft/res/text/fr-fr/hour.word deleted file mode 100644 index cfa09b25c3ab..000000000000 --- a/mycroft/res/text/fr-fr/hour.word +++ /dev/null @@ -1 +0,0 @@ -heure diff --git a/mycroft/res/text/fr-fr/hours.word b/mycroft/res/text/fr-fr/hours.word deleted file mode 100644 index 5afb41b14ac2..000000000000 --- a/mycroft/res/text/fr-fr/hours.word +++ /dev/null @@ -1 +0,0 @@ -heures diff --git a/mycroft/res/text/fr-fr/i didn't catch that.dialog b/mycroft/res/text/fr-fr/i didn't catch that.dialog deleted file mode 100644 index 98f40ae701cd..000000000000 --- a/mycroft/res/text/fr-fr/i didn't catch that.dialog +++ /dev/null @@ -1,5 +0,0 @@ -Désolé, je n'ai pas compris -J'ai bien peur de ne pas avoir compris -Peux-tu répéter ? -Peux-tu répéter, s'il te plaît ? -Aurais-tu l'obligeance de répéter ? diff --git a/mycroft/res/text/fr-fr/last.voc b/mycroft/res/text/fr-fr/last.voc deleted file mode 100644 index 8971982b6851..000000000000 --- a/mycroft/res/text/fr-fr/last.voc +++ /dev/null @@ -1,4 +0,0 @@ -dernier -dernière -derniers -dernières diff --git a/mycroft/res/text/fr-fr/learning disabled.dialog b/mycroft/res/text/fr-fr/learning disabled.dialog deleted file mode 100644 index 5cdc3c0a60e4..000000000000 --- a/mycroft/res/text/fr-fr/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Les données d'interaction ne seront plus envoyées à Mycroft A.I. diff --git a/mycroft/res/text/fr-fr/learning enabled.dialog b/mycroft/res/text/fr-fr/learning enabled.dialog deleted file mode 100644 index 0856c41c20a1..000000000000 --- a/mycroft/res/text/fr-fr/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Dorénavant, je vais envoyer les données d'interaction à Mycroft A.I. pour être plus intelligent. Pour l'instant, cela inclut les enregistrements des activations par mot d'éveil. diff --git a/mycroft/res/text/fr-fr/message_rebooting.dialog b/mycroft/res/text/fr-fr/message_rebooting.dialog deleted file mode 100644 index e113b6c67f5c..000000000000 --- a/mycroft/res/text/fr-fr/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -REDÉMARRAGE... diff --git a/mycroft/res/text/fr-fr/message_synching.clock.dialog b/mycroft/res/text/fr-fr/message_synching.clock.dialog deleted file mode 100644 index 7bd303eb04a9..000000000000 --- a/mycroft/res/text/fr-fr/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNC < < < diff --git a/mycroft/res/text/fr-fr/message_updating.dialog b/mycroft/res/text/fr-fr/message_updating.dialog deleted file mode 100644 index f7044aae3bef..000000000000 --- a/mycroft/res/text/fr-fr/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < MISE À JOUR < < < diff --git a/mycroft/res/text/fr-fr/minute.word b/mycroft/res/text/fr-fr/minute.word deleted file mode 100644 index cfcd96c97a7b..000000000000 --- a/mycroft/res/text/fr-fr/minute.word +++ /dev/null @@ -1 +0,0 @@ -minute diff --git a/mycroft/res/text/fr-fr/minutes.word b/mycroft/res/text/fr-fr/minutes.word deleted file mode 100644 index 5cf0e30b3599..000000000000 --- a/mycroft/res/text/fr-fr/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minutes diff --git a/mycroft/res/text/fr-fr/mycroft.intro.dialog b/mycroft/res/text/fr-fr/mycroft.intro.dialog deleted file mode 100644 index 0964c0c2faa3..000000000000 --- a/mycroft/res/text/fr-fr/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Bonjour, je suis Mycroft, ton nouvel assistant. Pour t'assister, j'ai besoin d'être connecté à Internet. Tu peux me connecter avec un câble réseau, ou bien utiliser le wi-fi. Suis ces instructions pour configurer le wi-fi : diff --git a/mycroft/res/text/fr-fr/no.voc b/mycroft/res/text/fr-fr/no.voc deleted file mode 100644 index 51e584d6a09b..000000000000 --- a/mycroft/res/text/fr-fr/no.voc +++ /dev/null @@ -1,4 +0,0 @@ -non -nan -nan -négatif diff --git a/mycroft/res/text/fr-fr/not connected to the internet.dialog b/mycroft/res/text/fr-fr/not connected to the internet.dialog deleted file mode 100644 index 2c41679dd366..000000000000 --- a/mycroft/res/text/fr-fr/not connected to the internet.dialog +++ /dev/null @@ -1,4 +0,0 @@ -On dirait que je ne suis pas connecté à Internet -Je ne pense pas être connecté à Internet -Je n'arrive pas à accéder à Internet -Je ne peux pas accéder à Internet diff --git a/mycroft/res/text/fr-fr/phonetic_spellings.txt b/mycroft/res/text/fr-fr/phonetic_spellings.txt deleted file mode 100644 index a8b1d7119561..000000000000 --- a/mycroft/res/text/fr-fr/phonetic_spellings.txt +++ /dev/null @@ -1 +0,0 @@ -mycroft: maycroft diff --git a/mycroft/res/text/fr-fr/reset to factory defaults.dialog b/mycroft/res/text/fr-fr/reset to factory defaults.dialog deleted file mode 100644 index 8826362399e0..000000000000 --- a/mycroft/res/text/fr-fr/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -J'ai été réinitialisé. diff --git a/mycroft/res/text/fr-fr/second.word b/mycroft/res/text/fr-fr/second.word deleted file mode 100644 index 110f96894a85..000000000000 --- a/mycroft/res/text/fr-fr/second.word +++ /dev/null @@ -1 +0,0 @@ -seconde diff --git a/mycroft/res/text/fr-fr/seconds.word b/mycroft/res/text/fr-fr/seconds.word deleted file mode 100644 index 7eac62afe41b..000000000000 --- a/mycroft/res/text/fr-fr/seconds.word +++ /dev/null @@ -1 +0,0 @@ -secondes diff --git a/mycroft/res/text/fr-fr/skills updated.dialog b/mycroft/res/text/fr-fr/skills updated.dialog deleted file mode 100644 index ce7c14b565fb..000000000000 --- a/mycroft/res/text/fr-fr/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Je suis à jour, maintenant. -Compétences mises à jour. Je suis prêt à t'aider. diff --git a/mycroft/res/text/fr-fr/sorry I couldn't install default skills.dialog b/mycroft/res/text/fr-fr/sorry I couldn't install default skills.dialog deleted file mode 100644 index 59caa2965bf7..000000000000 --- a/mycroft/res/text/fr-fr/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -Une erreur est survenue lors de la mise à jour des compétences. diff --git a/mycroft/res/text/fr-fr/ssh disabled.dialog b/mycroft/res/text/fr-fr/ssh disabled.dialog deleted file mode 100644 index 655907ebb083..000000000000 --- a/mycroft/res/text/fr-fr/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -La connexion SSH a été désactivée diff --git a/mycroft/res/text/fr-fr/ssh enabled.dialog b/mycroft/res/text/fr-fr/ssh enabled.dialog deleted file mode 100644 index 4869272b1786..000000000000 --- a/mycroft/res/text/fr-fr/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -La connexion SSH a été activée diff --git a/mycroft/res/text/fr-fr/time.changed.reboot.dialog b/mycroft/res/text/fr-fr/time.changed.reboot.dialog deleted file mode 100644 index 41dbcc2b4e15..000000000000 --- a/mycroft/res/text/fr-fr/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Je dois redémarrer après avoir synchronisé mon horloge avec internet, à tout de suite. diff --git a/mycroft/res/text/fr-fr/yes.voc b/mycroft/res/text/fr-fr/yes.voc deleted file mode 100644 index 211ccaf4bbbe..000000000000 --- a/mycroft/res/text/fr-fr/yes.voc +++ /dev/null @@ -1,5 +0,0 @@ -oui -ouais -voui -bien sur -s'il vous plait diff --git a/mycroft/res/text/hu-hu/backend.down.dialog b/mycroft/res/text/hu-hu/backend.down.dialog deleted file mode 100644 index a98a2299976e..000000000000 --- a/mycroft/res/text/hu-hu/backend.down.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Problémák merültek fel a szerverhez való kapcsolódás során. Pár perc múlva próbálj meg ismét beszélni hozzám. -Úgy tűnik, nem tudok kapcsolódni a Mycroft szervereihez. Várj néhány percet, mielőtt újra szólnál hozzám. diff --git a/mycroft/res/text/hu-hu/cancel.voc b/mycroft/res/text/hu-hu/cancel.voc deleted file mode 100644 index 4194f2ebae56..000000000000 --- a/mycroft/res/text/hu-hu/cancel.voc +++ /dev/null @@ -1,5 +0,0 @@ -mégse -mégsem -hagyd -hagyjuk -felejtsd el \ No newline at end of file diff --git a/mycroft/res/text/hu-hu/checking for updates.dialog b/mycroft/res/text/hu-hu/checking for updates.dialog deleted file mode 100644 index 687a7c3a62d8..000000000000 --- a/mycroft/res/text/hu-hu/checking for updates.dialog +++ /dev/null @@ -1,3 +0,0 @@ -Frissítések keresése -Kis türelmet kérek, frissítem magamat -Frissítés folyamatban diff --git a/mycroft/res/text/hu-hu/common_play.voc b/mycroft/res/text/hu-hu/common_play.voc deleted file mode 100644 index 49adfc01ff84..000000000000 --- a/mycroft/res/text/hu-hu/common_play.voc +++ /dev/null @@ -1,7 +0,0 @@ -zenélni -zenelejátszás -zenélés -zenélve -zenét -zenélj -OCP diff --git a/mycroft/res/text/hu-hu/i didn't catch that.dialog b/mycroft/res/text/hu-hu/i didn't catch that.dialog deleted file mode 100644 index c66aaad30342..000000000000 --- a/mycroft/res/text/hu-hu/i didn't catch that.dialog +++ /dev/null @@ -1,5 +0,0 @@ -Sajnos nem értettelek -Sajnos ezt nem értettem -Attól tartok, ezt nem értem -Kérlek ezt mondd el újra! -Megismételnéd? diff --git a/mycroft/res/text/hu-hu/learning disabled.dialog b/mycroft/res/text/hu-hu/learning disabled.dialog deleted file mode 100644 index 714b35176809..000000000000 --- a/mycroft/res/text/hu-hu/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Az interakciók adatait többé nem osztom meg a Mycroft AI szerverével. diff --git a/mycroft/res/text/hu-hu/learning enabled.dialog b/mycroft/res/text/hu-hu/learning enabled.dialog deleted file mode 100644 index a18fccc60bd1..000000000000 --- a/mycroft/res/text/hu-hu/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Az interakciók adatait feltöltöm a Mycroft AI szerverére, hogy intelligensebb lehessek. Ez jelenleg a hívószóval történő aktiválások felvételeit tartalmazza. diff --git a/mycroft/res/text/hu-hu/message_rebooting.dialog b/mycroft/res/text/hu-hu/message_rebooting.dialog deleted file mode 100644 index 42f01c45e145..000000000000 --- a/mycroft/res/text/hu-hu/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -ÚJRAINDÍTÁS... diff --git a/mycroft/res/text/hu-hu/message_synching.clock.dialog b/mycroft/res/text/hu-hu/message_synching.clock.dialog deleted file mode 100644 index ebea07c37f68..000000000000 --- a/mycroft/res/text/hu-hu/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SZINKRONIZÁLÁS < < < diff --git a/mycroft/res/text/hu-hu/message_updating.dialog b/mycroft/res/text/hu-hu/message_updating.dialog deleted file mode 100644 index 1277feba5d3d..000000000000 --- a/mycroft/res/text/hu-hu/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < FRISSÍTÉS < < < diff --git a/mycroft/res/text/hu-hu/mycroft.intro.dialog b/mycroft/res/text/hu-hu/mycroft.intro.dialog deleted file mode 100644 index 37fb4a6a42db..000000000000 --- a/mycroft/res/text/hu-hu/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Üdvözöllek, Mycroft vagyok, az új asszisztensed. Hogy segíthessek, internetkapcsolatra van szükségem. Egy hálózati kábellel, vagy wifi segítségével is rákapcsolhatsz a netre. A wifi beállításához kövesd az alábbi útmutatást: diff --git a/mycroft/res/text/hu-hu/no.voc b/mycroft/res/text/hu-hu/no.voc deleted file mode 100644 index 54210669443b..000000000000 --- a/mycroft/res/text/hu-hu/no.voc +++ /dev/null @@ -1,6 +0,0 @@ -ne -nem -dehogy -dehogyis -á -negatív \ No newline at end of file diff --git a/mycroft/res/text/hu-hu/not connected to the internet.dialog b/mycroft/res/text/hu-hu/not connected to the internet.dialog deleted file mode 100644 index 457caf8d1cdc..000000000000 --- a/mycroft/res/text/hu-hu/not connected to the internet.dialog +++ /dev/null @@ -1,3 +0,0 @@ -Úgy tűnik, nem vagyok kapcsolódva az internetre, kérlek ellenőrizd a hálózati kapcsolatot. -Jelenleg nem tudom elérni az internetet, kérlek ellenőrizd a hálózati kapcsolatot. -Nem sikerül elérni az internetet, kérlek ellenőrizd a hálózati kapcsolatot. diff --git a/mycroft/res/text/hu-hu/not.loaded.dialog b/mycroft/res/text/hu-hu/not.loaded.dialog deleted file mode 100644 index 08f64d89cb41..000000000000 --- a/mycroft/res/text/hu-hu/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Még nem töltődött be minden rendszerem, kis türelmet kérek. diff --git a/mycroft/res/text/hu-hu/phonetic_spellings.txt b/mycroft/res/text/hu-hu/phonetic_spellings.txt deleted file mode 100644 index 9eb0c3eaf696..000000000000 --- a/mycroft/res/text/hu-hu/phonetic_spellings.txt +++ /dev/null @@ -1,3 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. -mycroftai: mycroft A.I. diff --git a/mycroft/res/text/hu-hu/reset to factory defaults.dialog b/mycroft/res/text/hu-hu/reset to factory defaults.dialog deleted file mode 100644 index 3378f9aeeede..000000000000 --- a/mycroft/res/text/hu-hu/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Visszaállítottam a gyári beállításaimat. diff --git a/mycroft/res/text/hu-hu/skill.error.dialog b/mycroft/res/text/hu-hu/skill.error.dialog deleted file mode 100644 index b07ba7b959dd..000000000000 --- a/mycroft/res/text/hu-hu/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -{{skill}} képességben hiba lépett fel a kérés feldolgozása során diff --git a/mycroft/res/text/hu-hu/skills updated.dialog b/mycroft/res/text/hu-hu/skills updated.dialog deleted file mode 100644 index 9144c657252a..000000000000 --- a/mycroft/res/text/hu-hu/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Naprakész állapotban vagyok -A képességek frissültek. Állok rendelkezésedre. diff --git a/mycroft/res/text/hu-hu/sorry I couldn't install default skills.dialog b/mycroft/res/text/hu-hu/sorry I couldn't install default skills.dialog deleted file mode 100644 index f671c1561ff1..000000000000 --- a/mycroft/res/text/hu-hu/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -a képességek frissítése közben hiba lépett fel diff --git a/mycroft/res/text/hu-hu/ssh disabled.dialog b/mycroft/res/text/hu-hu/ssh disabled.dialog deleted file mode 100644 index a1c77157ed15..000000000000 --- a/mycroft/res/text/hu-hu/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Az SSH bejelentkezés mostantól nem lehetséges diff --git a/mycroft/res/text/hu-hu/ssh enabled.dialog b/mycroft/res/text/hu-hu/ssh enabled.dialog deleted file mode 100644 index cb65664bf36b..000000000000 --- a/mycroft/res/text/hu-hu/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Az SSH bejelentkezés mostantól engedélyezett diff --git a/mycroft/res/text/hu-hu/time.changed.reboot.dialog b/mycroft/res/text/hu-hu/time.changed.reboot.dialog deleted file mode 100644 index 003660b5fd5f..000000000000 --- a/mycroft/res/text/hu-hu/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Újraindítom magamat, miután az órámat szinkronizáltam az internettel. Mindjárt visszatérek. diff --git a/mycroft/res/text/hu-hu/yes.voc b/mycroft/res/text/hu-hu/yes.voc deleted file mode 100644 index d54a861dfdc3..000000000000 --- a/mycroft/res/text/hu-hu/yes.voc +++ /dev/null @@ -1,7 +0,0 @@ -igen -ja -aha -persze -légyszi -légyszíves -kérlek diff --git a/mycroft/res/text/it-it/backend.down.dialog b/mycroft/res/text/it-it/backend.down.dialog deleted file mode 100644 index ffc6aa53a880..000000000000 --- a/mycroft/res/text/it-it/backend.down.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Ho problemi a comunicare con i server Mycroft. Per favore, dammi qualche minuto prima di provare a parlarmi. -Ho problemi a comunicare con i server Mycroft. Per favore aspetta qualche minuto prima di provare a parlarmi. -Sembra che non riesco a connettermi ai server Mycroft. Per favore, dammi qualche minuto prima di provare a parlarmi. -Sembra che non riesco a connettermi ai server Mycroft. Per favore aspetta qualche minuto prima di provare a parlarm diff --git a/mycroft/res/text/it-it/cancel.voc b/mycroft/res/text/it-it/cancel.voc deleted file mode 100644 index a237d28005b3..000000000000 --- a/mycroft/res/text/it-it/cancel.voc +++ /dev/null @@ -1,4 +0,0 @@ -Annulla -non importa -Dimenticalo -Cancella diff --git a/mycroft/res/text/it-it/checking for updates.dialog b/mycroft/res/text/it-it/checking for updates.dialog deleted file mode 100644 index 10132c390363..000000000000 --- a/mycroft/res/text/it-it/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Verifico aggiornamenti -Un momento mentre mi aggiorno diff --git a/mycroft/res/text/it-it/common_play.voc b/mycroft/res/text/it-it/common_play.voc deleted file mode 100644 index cf5512078001..000000000000 --- a/mycroft/res/text/it-it/common_play.voc +++ /dev/null @@ -1,10 +0,0 @@ -riprodurre -suonare -riproduzione -avviare -avvio -avvia -metti -ascolti -ascoltare -OCP diff --git a/mycroft/res/text/it-it/day.word b/mycroft/res/text/it-it/day.word deleted file mode 100644 index e5d9b11c6974..000000000000 --- a/mycroft/res/text/it-it/day.word +++ /dev/null @@ -1 +0,0 @@ -giorno diff --git a/mycroft/res/text/it-it/days.word b/mycroft/res/text/it-it/days.word deleted file mode 100644 index f042e0c4df69..000000000000 --- a/mycroft/res/text/it-it/days.word +++ /dev/null @@ -1 +0,0 @@ -giorni diff --git a/mycroft/res/text/it-it/hour.word b/mycroft/res/text/it-it/hour.word deleted file mode 100644 index cb26009f4b7b..000000000000 --- a/mycroft/res/text/it-it/hour.word +++ /dev/null @@ -1 +0,0 @@ -hora diff --git a/mycroft/res/text/it-it/hours.word b/mycroft/res/text/it-it/hours.word deleted file mode 100644 index b9f40a7b1111..000000000000 --- a/mycroft/res/text/it-it/hours.word +++ /dev/null @@ -1 +0,0 @@ -ore diff --git a/mycroft/res/text/it-it/i didn't catch that.dialog b/mycroft/res/text/it-it/i didn't catch that.dialog deleted file mode 100644 index 2d7389f69a18..000000000000 --- a/mycroft/res/text/it-it/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Scusa, non ho capito -Temo di non capire -Puoi ripetere? -Puoi ripetere per favore? diff --git a/mycroft/res/text/it-it/last.voc b/mycroft/res/text/it-it/last.voc deleted file mode 100644 index cbb44e82d5ee..000000000000 --- a/mycroft/res/text/it-it/last.voc +++ /dev/null @@ -1,5 +0,0 @@ -ultimo -ultima -ultimi -ultime -finale diff --git a/mycroft/res/text/it-it/learning disabled.dialog b/mycroft/res/text/it-it/learning disabled.dialog deleted file mode 100644 index ae3925cbb214..000000000000 --- a/mycroft/res/text/it-it/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -I dati di interazione non saranno più inviati a Mycroft AI. diff --git a/mycroft/res/text/it-it/learning enabled.dialog b/mycroft/res/text/it-it/learning enabled.dialog deleted file mode 100644 index 848022491911..000000000000 --- a/mycroft/res/text/it-it/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Ora caricherò i dati di interazione su Mycroft AI per consentirmi di diventare più intelligente. Attualmente questo include le registrazioni di attivazioni con wake-word. diff --git a/mycroft/res/text/it-it/message_rebooting.dialog b/mycroft/res/text/it-it/message_rebooting.dialog deleted file mode 100644 index 8952aa3bf17b..000000000000 --- a/mycroft/res/text/it-it/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -REBOOTING... diff --git a/mycroft/res/text/it-it/message_synching.clock.dialog b/mycroft/res/text/it-it/message_synching.clock.dialog deleted file mode 100644 index 7bd303eb04a9..000000000000 --- a/mycroft/res/text/it-it/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNC < < < diff --git a/mycroft/res/text/it-it/message_updating.dialog b/mycroft/res/text/it-it/message_updating.dialog deleted file mode 100644 index 4899d9cf45c8..000000000000 --- a/mycroft/res/text/it-it/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < UPDATING < < < diff --git a/mycroft/res/text/it-it/minute.word b/mycroft/res/text/it-it/minute.word deleted file mode 100644 index 9b63882612ee..000000000000 --- a/mycroft/res/text/it-it/minute.word +++ /dev/null @@ -1 +0,0 @@ -minuto diff --git a/mycroft/res/text/it-it/minutes.word b/mycroft/res/text/it-it/minutes.word deleted file mode 100644 index a4cb0ec7ae36..000000000000 --- a/mycroft/res/text/it-it/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minuti diff --git a/mycroft/res/text/it-it/mycroft.intro.dialog b/mycroft/res/text/it-it/mycroft.intro.dialog deleted file mode 100644 index 692a970d4965..000000000000 --- a/mycroft/res/text/it-it/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Ciao sono Mycroft, il tuo nuovo assistente. Per aiutarti devo essere connesso a Internet. Puoi collegarmi con un cavo di rete o utilizzare il wifi. Segui queste istruzioni per configurare il wifi: diff --git a/mycroft/res/text/it-it/no.voc b/mycroft/res/text/it-it/no.voc deleted file mode 100644 index abce1d4fb8ab..000000000000 --- a/mycroft/res/text/it-it/no.voc +++ /dev/null @@ -1,4 +0,0 @@ -no -no no -naah -negativo diff --git a/mycroft/res/text/it-it/not connected to the internet.dialog b/mycroft/res/text/it-it/not connected to the internet.dialog deleted file mode 100644 index 90a655335df4..000000000000 --- a/mycroft/res/text/it-it/not connected to the internet.dialog +++ /dev/null @@ -1,5 +0,0 @@ -Sembra che non sia connesso a Internet, controlla la tua connessione di rete. -Non sembro essere connesso a Internet, controlla la tua connessione di rete. -Non riesco a raggiungere Internet in questo momento, controlla la tua connessione di rete. -Non riesco a raggiungere Internet, controlla la tua connessione di rete. -Ho problemi a raggiungere Internet in questo momento, controlla la tua connessione di rete. diff --git a/mycroft/res/text/it-it/not.loaded.dialog b/mycroft/res/text/it-it/not.loaded.dialog deleted file mode 100644 index 164cba9bae4d..000000000000 --- a/mycroft/res/text/it-it/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Per favore aspetta un attimo mentre finisco di caricare il mio software. diff --git a/mycroft/res/text/it-it/phonetic_spellings.txt b/mycroft/res/text/it-it/phonetic_spellings.txt deleted file mode 100644 index dfa3cb9a674e..000000000000 --- a/mycroft/res/text/it-it/phonetic_spellings.txt +++ /dev/null @@ -1,5 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. -mycroftai: mycroft A.I. -spotify: spot-ify -corgi: core-gee diff --git a/mycroft/res/text/it-it/reset to factory defaults.dialog b/mycroft/res/text/it-it/reset to factory defaults.dialog deleted file mode 100644 index ff728c7750e2..000000000000 --- a/mycroft/res/text/it-it/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Sono stato ripristinato alle impostazioni di fabbrica. diff --git a/mycroft/res/text/it-it/second.word b/mycroft/res/text/it-it/second.word deleted file mode 100644 index 254add614c95..000000000000 --- a/mycroft/res/text/it-it/second.word +++ /dev/null @@ -1 +0,0 @@ -secondo diff --git a/mycroft/res/text/it-it/seconds.word b/mycroft/res/text/it-it/seconds.word deleted file mode 100644 index bdfb0db3360b..000000000000 --- a/mycroft/res/text/it-it/seconds.word +++ /dev/null @@ -1 +0,0 @@ -secondi diff --git a/mycroft/res/text/it-it/skill.error.dialog b/mycroft/res/text/it-it/skill.error.dialog deleted file mode 100644 index ed0ea2399624..000000000000 --- a/mycroft/res/text/it-it/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -Si è verificato un errore durante l'elaborazione di una richiesta in {{skill}} diff --git a/mycroft/res/text/it-it/skills updated.dialog b/mycroft/res/text/it-it/skills updated.dialog deleted file mode 100644 index 86e0b0b4511e..000000000000 --- a/mycroft/res/text/it-it/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Ora sono aggiornato -Abilità aggiornate. Sono pronto ad aiutarti. diff --git a/mycroft/res/text/it-it/sorry I couldn't install default skills.dialog b/mycroft/res/text/it-it/sorry I couldn't install default skills.dialog deleted file mode 100644 index 5256a82015f4..000000000000 --- a/mycroft/res/text/it-it/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -si è verificato un errore durante l'aggiornamento delle abilità diff --git a/mycroft/res/text/it-it/ssh disabled.dialog b/mycroft/res/text/it-it/ssh disabled.dialog deleted file mode 100644 index e773e5282198..000000000000 --- a/mycroft/res/text/it-it/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -L'accesso SSH è stato disabilitato diff --git a/mycroft/res/text/it-it/ssh enabled.dialog b/mycroft/res/text/it-it/ssh enabled.dialog deleted file mode 100644 index 4f9ab81f99e2..000000000000 --- a/mycroft/res/text/it-it/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Gli accessi SSH ora sono consentiti diff --git a/mycroft/res/text/it-it/time.changed.reboot.dialog b/mycroft/res/text/it-it/time.changed.reboot.dialog deleted file mode 100644 index 78951f69bf5b..000000000000 --- a/mycroft/res/text/it-it/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Ho bisogno di riavviarmi dopo aver sincronizzato il mio orologio con internet, torno subito. diff --git a/mycroft/res/text/it-it/yes.voc b/mycroft/res/text/it-it/yes.voc deleted file mode 100644 index f299bd469688..000000000000 --- a/mycroft/res/text/it-it/yes.voc +++ /dev/null @@ -1,5 +0,0 @@ -si -si si -sicuro -certo -prego diff --git a/mycroft/res/text/nl-nl/backend.down.dialog b/mycroft/res/text/nl-nl/backend.down.dialog deleted file mode 100644 index 0a902c3c45e0..000000000000 --- a/mycroft/res/text/nl-nl/backend.down.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Ik kan niet communiceren met de Mycroft servers. Wacht alsjeblieft een paar minuten voordat je met mij probeert te praten. -Ik lijkt erop dat ik geen connectie kan maken met de Mycroft servers. Geef me alsjeblieft een paar minuten voordat je met mij probeert te praten. diff --git a/mycroft/res/text/nl-nl/cancel.voc b/mycroft/res/text/nl-nl/cancel.voc deleted file mode 100644 index bbb36e233e6b..000000000000 --- a/mycroft/res/text/nl-nl/cancel.voc +++ /dev/null @@ -1,2 +0,0 @@ -cancel -laat maar diff --git a/mycroft/res/text/nl-nl/checking for updates.dialog b/mycroft/res/text/nl-nl/checking for updates.dialog deleted file mode 100644 index c19c42b57e03..000000000000 --- a/mycroft/res/text/nl-nl/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Ik zoek naar updates -Een momentje alsjeblieft, ik update mezelf diff --git a/mycroft/res/text/nl-nl/common_play.voc b/mycroft/res/text/nl-nl/common_play.voc deleted file mode 100644 index e4a731443643..000000000000 --- a/mycroft/res/text/nl-nl/common_play.voc +++ /dev/null @@ -1,5 +0,0 @@ -afspelen -speel -spelen -start -OCP diff --git a/mycroft/res/text/nl-nl/day.word b/mycroft/res/text/nl-nl/day.word deleted file mode 100644 index 12ad2aee7d5f..000000000000 --- a/mycroft/res/text/nl-nl/day.word +++ /dev/null @@ -1 +0,0 @@ -dag diff --git a/mycroft/res/text/nl-nl/days.word b/mycroft/res/text/nl-nl/days.word deleted file mode 100644 index d0ad4edc4044..000000000000 --- a/mycroft/res/text/nl-nl/days.word +++ /dev/null @@ -1 +0,0 @@ -dagen diff --git a/mycroft/res/text/nl-nl/hour.word b/mycroft/res/text/nl-nl/hour.word deleted file mode 100644 index 4421f6541895..000000000000 --- a/mycroft/res/text/nl-nl/hour.word +++ /dev/null @@ -1 +0,0 @@ -uur diff --git a/mycroft/res/text/nl-nl/hours.word b/mycroft/res/text/nl-nl/hours.word deleted file mode 100644 index 219d3b52dc59..000000000000 --- a/mycroft/res/text/nl-nl/hours.word +++ /dev/null @@ -1 +0,0 @@ -uren diff --git a/mycroft/res/text/nl-nl/i am awake.dialog b/mycroft/res/text/nl-nl/i am awake.dialog deleted file mode 100644 index a1bd32d8a06c..000000000000 --- a/mycroft/res/text/nl-nl/i am awake.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Ik ben wakker -Nu ben ik wakker diff --git a/mycroft/res/text/nl-nl/i didn't catch that.dialog b/mycroft/res/text/nl-nl/i didn't catch that.dialog deleted file mode 100644 index c8aa79fb3c17..000000000000 --- a/mycroft/res/text/nl-nl/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Sorry, dat heb ik niet begrepen -Ik ben bang dat ik dat niet heb verstaan -Kun je dat nog eens zeggen? -Zou je dat willen herhalen alsjeblieft? diff --git a/mycroft/res/text/nl-nl/last.voc b/mycroft/res/text/nl-nl/last.voc deleted file mode 100644 index f8102ca0fdb7..000000000000 --- a/mycroft/res/text/nl-nl/last.voc +++ /dev/null @@ -1,2 +0,0 @@ -laatste -laatst diff --git a/mycroft/res/text/nl-nl/learning disabled.dialog b/mycroft/res/text/nl-nl/learning disabled.dialog deleted file mode 100644 index 84f80c5b02a4..000000000000 --- a/mycroft/res/text/nl-nl/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Interactiegegevens zullen niet langer bij Mycroft AI worden ingediend. diff --git a/mycroft/res/text/nl-nl/learning enabled.dialog b/mycroft/res/text/nl-nl/learning enabled.dialog deleted file mode 100644 index 58278e84e763..000000000000 --- a/mycroft/res/text/nl-nl/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Ik zal nu de interactiegegevens bij Mycroft AI indienen, zodat ik slimmer kan worden. Dit zijn momenteel onder andere opnames van wekwoordactivaties. diff --git a/mycroft/res/text/nl-nl/message_rebooting.dialog b/mycroft/res/text/nl-nl/message_rebooting.dialog deleted file mode 100644 index 252cdcc7d5f4..000000000000 --- a/mycroft/res/text/nl-nl/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -HERSTARTEN... diff --git a/mycroft/res/text/nl-nl/message_synching.clock.dialog b/mycroft/res/text/nl-nl/message_synching.clock.dialog deleted file mode 100644 index 8aeb858b47a4..000000000000 --- a/mycroft/res/text/nl-nl/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNC < < < \ No newline at end of file diff --git a/mycroft/res/text/nl-nl/message_updating.dialog b/mycroft/res/text/nl-nl/message_updating.dialog deleted file mode 100644 index 6d5a6b2fc7db..000000000000 --- a/mycroft/res/text/nl-nl/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < UPDATING < < < \ No newline at end of file diff --git a/mycroft/res/text/nl-nl/minute.word b/mycroft/res/text/nl-nl/minute.word deleted file mode 100644 index 342ac41a5d8c..000000000000 --- a/mycroft/res/text/nl-nl/minute.word +++ /dev/null @@ -1 +0,0 @@ -minuut diff --git a/mycroft/res/text/nl-nl/minutes.word b/mycroft/res/text/nl-nl/minutes.word deleted file mode 100644 index 0d2e3207e200..000000000000 --- a/mycroft/res/text/nl-nl/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minuten diff --git a/mycroft/res/text/nl-nl/mycroft.intro.dialog b/mycroft/res/text/nl-nl/mycroft.intro.dialog deleted file mode 100644 index cbbec4fa0519..000000000000 --- a/mycroft/res/text/nl-nl/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Hoi ik ben Mycroft, jouw nieuwe assistent. Om je te kunnen helpen moet ik verbonden zijn met het internet. Je kan me verbinden met een netwerkkabel of via wifi. Volg deze instructies om wifi te configureren: diff --git a/mycroft/res/text/nl-nl/no.voc b/mycroft/res/text/nl-nl/no.voc deleted file mode 100644 index 7718780e67a1..000000000000 --- a/mycroft/res/text/nl-nl/no.voc +++ /dev/null @@ -1,2 +0,0 @@ -nee -bedankt diff --git a/mycroft/res/text/nl-nl/not connected to the internet.dialog b/mycroft/res/text/nl-nl/not connected to the internet.dialog deleted file mode 100644 index aac722d2038b..000000000000 --- a/mycroft/res/text/nl-nl/not connected to the internet.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Blijkbaar ben ik niet met het internet verbonden -Ik lijk niet met het internet verbonden te zijn -Ik kan het internet nu niet bereiken -Ik ben niet in staat het internet te bereiken diff --git a/mycroft/res/text/nl-nl/not.loaded.dialog b/mycroft/res/text/nl-nl/not.loaded.dialog deleted file mode 100644 index 1e5fdf8391d9..000000000000 --- a/mycroft/res/text/nl-nl/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Wacht alsjeblieft tot ik opgestart ben. diff --git a/mycroft/res/text/nl-nl/phonetic_spellings.txt b/mycroft/res/text/nl-nl/phonetic_spellings.txt deleted file mode 100644 index fc719427a9d9..000000000000 --- a/mycroft/res/text/nl-nl/phonetic_spellings.txt +++ /dev/null @@ -1,5 +0,0 @@ -jalepeno: jallapenjo -ai: A.I. -mycroftai: mycroft A.I. -spotify: spot-ify -corgi: core-gee diff --git a/mycroft/res/text/nl-nl/reset to factory defaults.dialog b/mycroft/res/text/nl-nl/reset to factory defaults.dialog deleted file mode 100644 index a24b425168b3..000000000000 --- a/mycroft/res/text/nl-nl/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Mijn fabriekswaarden zijn hersteld diff --git a/mycroft/res/text/nl-nl/second.word b/mycroft/res/text/nl-nl/second.word deleted file mode 100644 index 110f96894a85..000000000000 --- a/mycroft/res/text/nl-nl/second.word +++ /dev/null @@ -1 +0,0 @@ -seconde diff --git a/mycroft/res/text/nl-nl/seconds.word b/mycroft/res/text/nl-nl/seconds.word deleted file mode 100644 index 7995c0c7d3f1..000000000000 --- a/mycroft/res/text/nl-nl/seconds.word +++ /dev/null @@ -1 +0,0 @@ -seconden diff --git a/mycroft/res/text/nl-nl/skill.error.dialog b/mycroft/res/text/nl-nl/skill.error.dialog deleted file mode 100644 index 05f821e221c9..000000000000 --- a/mycroft/res/text/nl-nl/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -Er is een fout opgetreden terwijl er een verzoek werd afgehandeld in {{skill}} diff --git a/mycroft/res/text/nl-nl/skills updated.dialog b/mycroft/res/text/nl-nl/skills updated.dialog deleted file mode 100644 index 69b64af9ec71..000000000000 --- a/mycroft/res/text/nl-nl/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Ik ben nu bijgewerkt -Vaardigheden bijgewerkt. Ik sta voor je klaar. diff --git a/mycroft/res/text/nl-nl/sorry I couldn't install default skills.dialog b/mycroft/res/text/nl-nl/sorry I couldn't install default skills.dialog deleted file mode 100644 index 2915a89f37bb..000000000000 --- a/mycroft/res/text/nl-nl/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1,2 +0,0 @@ -sorry, ik kon geen standaard vaardigheden installeren -er is een fout opgetreden tijdens het installeren van de standaard vaardigheden diff --git a/mycroft/res/text/nl-nl/ssh disabled.dialog b/mycroft/res/text/nl-nl/ssh disabled.dialog deleted file mode 100644 index 60223a2e452c..000000000000 --- a/mycroft/res/text/nl-nl/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH login is uitgeschakeld diff --git a/mycroft/res/text/nl-nl/ssh enabled.dialog b/mycroft/res/text/nl-nl/ssh enabled.dialog deleted file mode 100644 index 4b70dd2572b6..000000000000 --- a/mycroft/res/text/nl-nl/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH logins zijn nu toegestaan diff --git a/mycroft/res/text/nl-nl/time.changed.reboot.dialog b/mycroft/res/text/nl-nl/time.changed.reboot.dialog deleted file mode 100644 index 964642099db4..000000000000 --- a/mycroft/res/text/nl-nl/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Ik moet herstarten na het synchronizeren van mijn klok met het internet, ik ben zo terug. diff --git a/mycroft/res/text/nl-nl/yes.voc b/mycroft/res/text/nl-nl/yes.voc deleted file mode 100644 index 6121a10f4103..000000000000 --- a/mycroft/res/text/nl-nl/yes.voc +++ /dev/null @@ -1,2 +0,0 @@ -ja -graag diff --git a/mycroft/res/text/pl-pl/and.word b/mycroft/res/text/pl-pl/and.word deleted file mode 100644 index 0ddf2bae71d0..000000000000 --- a/mycroft/res/text/pl-pl/and.word +++ /dev/null @@ -1 +0,0 @@ -i diff --git a/mycroft/res/text/pl-pl/backend.down.dialog b/mycroft/res/text/pl-pl/backend.down.dialog deleted file mode 100644 index 2822ca3f66d4..000000000000 --- a/mycroft/res/text/pl-pl/backend.down.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Wystąpił problem z połączeniem do serwerów Mycroft. Daj mi parę minut przed kolejnym poleceniem. -Wystąpił problem z połączeniem do serwerów Mycroft. Poczekaj parę minut przed kolejnym poleceniem. -Wygląda na to, że nie mogę się połączyć z serwerami Mycroft. Daj mi parę minut przed kolejnym poleceniem. -Wygląda na to, że nie mogę się połączyć z serwerami Mycroft. Poczekaj parę minut przed kolejnym poleceniem. diff --git a/mycroft/res/text/pl-pl/cancel.voc b/mycroft/res/text/pl-pl/cancel.voc deleted file mode 100644 index 9e1d89cd1143..000000000000 --- a/mycroft/res/text/pl-pl/cancel.voc +++ /dev/null @@ -1,4 +0,0 @@ -anuluj -nieważne -zapomnij -stop diff --git a/mycroft/res/text/pl-pl/checking for updates.dialog b/mycroft/res/text/pl-pl/checking for updates.dialog deleted file mode 100644 index d5207300a598..000000000000 --- a/mycroft/res/text/pl-pl/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Sprawdzam aktualizacje -Aktualizuję się, daj mi chwilę diff --git a/mycroft/res/text/pl-pl/common_play.voc b/mycroft/res/text/pl-pl/common_play.voc deleted file mode 100644 index d25d328cfcea..000000000000 --- a/mycroft/res/text/pl-pl/common_play.voc +++ /dev/null @@ -1,11 +0,0 @@ -grać -graj -odtwarzać -granie -odtwarzanie -zabawa -włączyć -włączać -uruchomić -włącz -OCP diff --git a/mycroft/res/text/pl-pl/day.word b/mycroft/res/text/pl-pl/day.word deleted file mode 100644 index fdd7af4d09c0..000000000000 --- a/mycroft/res/text/pl-pl/day.word +++ /dev/null @@ -1 +0,0 @@ -dzień diff --git a/mycroft/res/text/pl-pl/days.word b/mycroft/res/text/pl-pl/days.word deleted file mode 100644 index a7738f00f0f7..000000000000 --- a/mycroft/res/text/pl-pl/days.word +++ /dev/null @@ -1 +0,0 @@ -dni diff --git a/mycroft/res/text/pl-pl/hour.word b/mycroft/res/text/pl-pl/hour.word deleted file mode 100644 index 8d8bde0bd7e3..000000000000 --- a/mycroft/res/text/pl-pl/hour.word +++ /dev/null @@ -1 +0,0 @@ -godzina diff --git a/mycroft/res/text/pl-pl/hours.word b/mycroft/res/text/pl-pl/hours.word deleted file mode 100644 index a53f25307c16..000000000000 --- a/mycroft/res/text/pl-pl/hours.word +++ /dev/null @@ -1 +0,0 @@ -godziny diff --git a/mycroft/res/text/pl-pl/i didn't catch that.dialog b/mycroft/res/text/pl-pl/i didn't catch that.dialog deleted file mode 100644 index d381297abc98..000000000000 --- a/mycroft/res/text/pl-pl/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Przepraszam, nie rozumiem tego -Możesz powtórzyć? -Nie jestem pewny czy to zrozumiałem -Możesz powiedzieć ponownie? diff --git a/mycroft/res/text/pl-pl/last.voc b/mycroft/res/text/pl-pl/last.voc deleted file mode 100644 index f4786cd553d7..000000000000 --- a/mycroft/res/text/pl-pl/last.voc +++ /dev/null @@ -1,3 +0,0 @@ -ostatni wybór -ostatnia opcja -ostatnia diff --git a/mycroft/res/text/pl-pl/learning disabled.dialog b/mycroft/res/text/pl-pl/learning disabled.dialog deleted file mode 100644 index 28dc76453191..000000000000 --- a/mycroft/res/text/pl-pl/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Dane interakcji nie będą już wysyłane do Mycroft AI. diff --git a/mycroft/res/text/pl-pl/learning enabled.dialog b/mycroft/res/text/pl-pl/learning enabled.dialog deleted file mode 100644 index e8c9219f2616..000000000000 --- a/mycroft/res/text/pl-pl/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Od tej pory będę wysyłał dane interakcji do Mycroft AI dzięki czemu będę mądrzejszy. Obecnie wysyłam także nagrania polecenia aktywacji. diff --git a/mycroft/res/text/pl-pl/message_loading.skills.dialog b/mycroft/res/text/pl-pl/message_loading.skills.dialog deleted file mode 100644 index 5975882500c2..000000000000 --- a/mycroft/res/text/pl-pl/message_loading.skills.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < ŁADUJĘ < < < diff --git a/mycroft/res/text/pl-pl/message_rebooting.dialog b/mycroft/res/text/pl-pl/message_rebooting.dialog deleted file mode 100644 index 6d2e6fc0979e..000000000000 --- a/mycroft/res/text/pl-pl/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -RESETUJĘ... diff --git a/mycroft/res/text/pl-pl/message_synching.clock.dialog b/mycroft/res/text/pl-pl/message_synching.clock.dialog deleted file mode 100644 index 042043e00a0d..000000000000 --- a/mycroft/res/text/pl-pl/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNCHRONIZACJA < < < diff --git a/mycroft/res/text/pl-pl/message_updating.dialog b/mycroft/res/text/pl-pl/message_updating.dialog deleted file mode 100644 index 0b46671159c4..000000000000 --- a/mycroft/res/text/pl-pl/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < AKTUALIZUJĘ < < < diff --git a/mycroft/res/text/pl-pl/minute.word b/mycroft/res/text/pl-pl/minute.word deleted file mode 100644 index 1b52e6173699..000000000000 --- a/mycroft/res/text/pl-pl/minute.word +++ /dev/null @@ -1 +0,0 @@ -minuta diff --git a/mycroft/res/text/pl-pl/minutes.word b/mycroft/res/text/pl-pl/minutes.word deleted file mode 100644 index a2d78dc05cad..000000000000 --- a/mycroft/res/text/pl-pl/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minuty diff --git a/mycroft/res/text/pl-pl/mycroft.intro.dialog b/mycroft/res/text/pl-pl/mycroft.intro.dialog deleted file mode 100644 index 6ac1d83bd1ff..000000000000 --- a/mycroft/res/text/pl-pl/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Cześć, jestem Mycroft, Twój nowy asystent. Żeby móc to robić, potrzebuję połączenia z Internetem. Możesz mnie podpiąć albo kablem Ethernet, albo do wifi. Aby połączyć z wifi, użyj tych instrukcji: diff --git a/mycroft/res/text/pl-pl/no.voc b/mycroft/res/text/pl-pl/no.voc deleted file mode 100644 index c4df79878961..000000000000 --- a/mycroft/res/text/pl-pl/no.voc +++ /dev/null @@ -1,2 +0,0 @@ -nie -odmawiam diff --git a/mycroft/res/text/pl-pl/not connected to the internet.dialog b/mycroft/res/text/pl-pl/not connected to the internet.dialog deleted file mode 100644 index 09d04551b60a..000000000000 --- a/mycroft/res/text/pl-pl/not connected to the internet.dialog +++ /dev/null @@ -1,3 +0,0 @@ -Nie mogę się połączyć z Internetem, sprawdź proszę połączenie. -Wygląda na to, że nie jestem podłączony do Internetu, sprawdź proszę połączenie. -Połączenie z Internetem nie działa, zweryfikuj czy jest poprawne. diff --git a/mycroft/res/text/pl-pl/not.loaded.dialog b/mycroft/res/text/pl-pl/not.loaded.dialog deleted file mode 100644 index c4638313312a..000000000000 --- a/mycroft/res/text/pl-pl/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Poczekaj jeszcze chwilę aż skończę się uruchamiać. diff --git a/mycroft/res/text/pl-pl/or.word b/mycroft/res/text/pl-pl/or.word deleted file mode 100644 index 5f914e5892ec..000000000000 --- a/mycroft/res/text/pl-pl/or.word +++ /dev/null @@ -1 +0,0 @@ -albo diff --git a/mycroft/res/text/pl-pl/phonetic_spellings.txt b/mycroft/res/text/pl-pl/phonetic_spellings.txt deleted file mode 100644 index dfa3cb9a674e..000000000000 --- a/mycroft/res/text/pl-pl/phonetic_spellings.txt +++ /dev/null @@ -1,5 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. -mycroftai: mycroft A.I. -spotify: spot-ify -corgi: core-gee diff --git a/mycroft/res/text/pl-pl/reset to factory defaults.dialog b/mycroft/res/text/pl-pl/reset to factory defaults.dialog deleted file mode 100644 index ec5c805bedd9..000000000000 --- a/mycroft/res/text/pl-pl/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Zostałem przywrócony do ustawień fabrycznych. diff --git a/mycroft/res/text/pl-pl/second.word b/mycroft/res/text/pl-pl/second.word deleted file mode 100644 index f07a357fa719..000000000000 --- a/mycroft/res/text/pl-pl/second.word +++ /dev/null @@ -1 +0,0 @@ -sekunda diff --git a/mycroft/res/text/pl-pl/seconds.word b/mycroft/res/text/pl-pl/seconds.word deleted file mode 100644 index b4b7bb917115..000000000000 --- a/mycroft/res/text/pl-pl/seconds.word +++ /dev/null @@ -1 +0,0 @@ -sekundy diff --git a/mycroft/res/text/pl-pl/skill.error.dialog b/mycroft/res/text/pl-pl/skill.error.dialog deleted file mode 100644 index a0d4e6c96dfe..000000000000 --- a/mycroft/res/text/pl-pl/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -Wystąpił błąd podczas przetwarzania polecenia przez {{skill}} diff --git a/mycroft/res/text/pl-pl/skills updated.dialog b/mycroft/res/text/pl-pl/skills updated.dialog deleted file mode 100644 index b62ebed8e015..000000000000 --- a/mycroft/res/text/pl-pl/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Jestem na bieżąco z aktualizacjami -Aktualizacje zainstalowane, w czym mogę pomóc? diff --git a/mycroft/res/text/pl-pl/sorry I couldn't install default skills.dialog b/mycroft/res/text/pl-pl/sorry I couldn't install default skills.dialog deleted file mode 100644 index 3f34d8bf0202..000000000000 --- a/mycroft/res/text/pl-pl/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -wystąpił błąd podczas aktualizacji umiejętności diff --git a/mycroft/res/text/pl-pl/ssh disabled.dialog b/mycroft/res/text/pl-pl/ssh disabled.dialog deleted file mode 100644 index 24de406d51c3..000000000000 --- a/mycroft/res/text/pl-pl/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Logowanie przez SSH zostało wyłączone diff --git a/mycroft/res/text/pl-pl/ssh enabled.dialog b/mycroft/res/text/pl-pl/ssh enabled.dialog deleted file mode 100644 index 3672b20b7c81..000000000000 --- a/mycroft/res/text/pl-pl/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Logowanie przez SSH zostało włączone diff --git a/mycroft/res/text/pl-pl/time.changed.reboot.dialog b/mycroft/res/text/pl-pl/time.changed.reboot.dialog deleted file mode 100644 index 0e2794e552e1..000000000000 --- a/mycroft/res/text/pl-pl/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Muszę się zresetować po synchronizacja zegara, zaraz wracam. diff --git a/mycroft/res/text/pl-pl/yes.voc b/mycroft/res/text/pl-pl/yes.voc deleted file mode 100644 index 987e9b7ff78f..000000000000 --- a/mycroft/res/text/pl-pl/yes.voc +++ /dev/null @@ -1,6 +0,0 @@ -tak -pewnie -jasne -oczywiście -potwierdzam -zgadza się diff --git a/mycroft/res/text/pt-pt/cancel.voc b/mycroft/res/text/pt-pt/cancel.voc deleted file mode 100644 index e4320b630c84..000000000000 --- a/mycroft/res/text/pt-pt/cancel.voc +++ /dev/null @@ -1,28 +0,0 @@ -esquece -cancela -cancelar -esquece isso -cancela isso -ignora o que eu disse -ignora isso -ignora isto -ignora esta ordem -ignora essa ordem -cancela esta ordem -cancela essa ordem -esquece esta ordem -esquece essa ordem -cancela ordem -cancelar ordem -ignora ordem -ignorar ordem -ignora esta instrução -ignora essa instrução -cancela esta instrução -cancela essa instrução -esquece esta instrução -esquece essa instrução -cancela instrução -cancelar instrução -ignora instrução -ignorar instrução \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/checking for updates.dialog b/mycroft/res/text/pt-pt/checking for updates.dialog deleted file mode 100644 index 6d9ef6aeaea4..000000000000 --- a/mycroft/res/text/pt-pt/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Verificando por actualizações -Um momento enquanto eu actualizo diff --git a/mycroft/res/text/pt-pt/common_play.voc b/mycroft/res/text/pt-pt/common_play.voc deleted file mode 100644 index c5c313b990d2..000000000000 --- a/mycroft/res/text/pt-pt/common_play.voc +++ /dev/null @@ -1,7 +0,0 @@ -iniciar -início -tocar -tocando -reprodução -reproduzir -OCP diff --git a/mycroft/res/text/pt-pt/i am awake.dialog b/mycroft/res/text/pt-pt/i am awake.dialog deleted file mode 100644 index 1eb1803e1422..000000000000 --- a/mycroft/res/text/pt-pt/i am awake.dialog +++ /dev/null @@ -1,3 +0,0 @@ -Estou disponível -Agora estou disponível - diff --git a/mycroft/res/text/pt-pt/i didn't catch that.dialog b/mycroft/res/text/pt-pt/i didn't catch that.dialog deleted file mode 100644 index 7668fbebe530..000000000000 --- a/mycroft/res/text/pt-pt/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Desculpe, não percebi -Não estou a conseguir perceber -Pode dizer isso outra vez? -Pode repetir novamente? diff --git a/mycroft/res/text/pt-pt/last.voc b/mycroft/res/text/pt-pt/last.voc deleted file mode 100644 index 87818d9103a1..000000000000 --- a/mycroft/res/text/pt-pt/last.voc +++ /dev/null @@ -1,13 +0,0 @@ -ùltimo -ùltima -ùltimos -ùltimas -último -última -últimos -últimas -ultimo -ultima -ultimos -ultimas -final diff --git a/mycroft/res/text/pt-pt/learning disabled.dialog b/mycroft/res/text/pt-pt/learning disabled.dialog deleted file mode 100644 index 804b09d6176d..000000000000 --- a/mycroft/res/text/pt-pt/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Não vou enviar mais dados sobre a nossa interacção para Mycroft AI. \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/learning enabled.dialog b/mycroft/res/text/pt-pt/learning enabled.dialog deleted file mode 100644 index a4a4c77b7653..000000000000 --- a/mycroft/res/text/pt-pt/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Vou começar a enviar dados sobre a nossa interacção para Mycroft AI para conseguir ficar mais inteligente. De momento isto inclui gravações do meu nome \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/message_rebooting.dialog b/mycroft/res/text/pt-pt/message_rebooting.dialog deleted file mode 100644 index 993eb8e95137..000000000000 --- a/mycroft/res/text/pt-pt/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -A REINICIAR... \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/message_synching.clock.dialog b/mycroft/res/text/pt-pt/message_synching.clock.dialog deleted file mode 100644 index 8aeb858b47a4..000000000000 --- a/mycroft/res/text/pt-pt/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNC < < < \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/message_updating.dialog b/mycroft/res/text/pt-pt/message_updating.dialog deleted file mode 100644 index 579b8ed7314e..000000000000 --- a/mycroft/res/text/pt-pt/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < A ACTUALIZAR < < < \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/mycroft.intro.dialog b/mycroft/res/text/pt-pt/mycroft.intro.dialog deleted file mode 100644 index 572b38e6c060..000000000000 --- a/mycroft/res/text/pt-pt/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Olá, Eu sou o Mycroft, o teu novo assistente. Para te ajudar preciso de estar ligado á internet. Podes ligar-me através de cabo ethernet ou wifi. Segue estes passos para utilizar wifi: \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/not connected to the internet.dialog b/mycroft/res/text/pt-pt/not connected to the internet.dialog deleted file mode 100644 index 70874a27a5a4..000000000000 --- a/mycroft/res/text/pt-pt/not connected to the internet.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Parece que não estou ligado à Internet -Não pareço estar ligado à Internet -Neste momento não estou a conseguir ligar-me à Internet -Não consigo ligar-me à Internet diff --git a/mycroft/res/text/pt-pt/not.loaded.dialog b/mycroft/res/text/pt-pt/not.loaded.dialog deleted file mode 100644 index 98e0ef3a6e1f..000000000000 --- a/mycroft/res/text/pt-pt/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Por favor aguarde um momento enquanto eu acabo de inicializar \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/phonetic_spellings.txt b/mycroft/res/text/pt-pt/phonetic_spellings.txt deleted file mode 100644 index 45ff8d6f5f9e..000000000000 --- a/mycroft/res/text/pt-pt/phonetic_spellings.txt +++ /dev/null @@ -1,2 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/reset to factory defaults.dialog b/mycroft/res/text/pt-pt/reset to factory defaults.dialog deleted file mode 100644 index 2ffb74e8a4d9..000000000000 --- a/mycroft/res/text/pt-pt/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Eu fui reiniciado para os padrões de fábrica. diff --git a/mycroft/res/text/pt-pt/skill.error.dialog b/mycroft/res/text/pt-pt/skill.error.dialog deleted file mode 100644 index 6f32c12f97ce..000000000000 --- a/mycroft/res/text/pt-pt/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -Ocorreu um erro ao executar a habilidade {{skill}} \ No newline at end of file diff --git a/mycroft/res/text/pt-pt/skills updated.dialog b/mycroft/res/text/pt-pt/skills updated.dialog deleted file mode 100644 index fef7ad3bf34a..000000000000 --- a/mycroft/res/text/pt-pt/skills updated.dialog +++ /dev/null @@ -1,3 +0,0 @@ -Agora estou actualizado -Competências atualizadas. Estou pronto para o ajudar - diff --git a/mycroft/res/text/pt-pt/sorry I couldn't install default skills.dialog b/mycroft/res/text/pt-pt/sorry I couldn't install default skills.dialog deleted file mode 100644 index c556cb5a400a..000000000000 --- a/mycroft/res/text/pt-pt/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Desculpe não consegui actualizar as competências padrão -Ocorreu um erro enquanto instalava as competências padrão diff --git a/mycroft/res/text/pt-pt/ssh disabled.dialog b/mycroft/res/text/pt-pt/ssh disabled.dialog deleted file mode 100644 index e89af7c365e9..000000000000 --- a/mycroft/res/text/pt-pt/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -A ligação SSH foi desactivada diff --git a/mycroft/res/text/pt-pt/ssh enabled.dialog b/mycroft/res/text/pt-pt/ssh enabled.dialog deleted file mode 100644 index 6625eb0cee9f..000000000000 --- a/mycroft/res/text/pt-pt/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -A ligação SSH está agora disponivel diff --git a/mycroft/res/text/pt-pt/time.changed.reboot.dialog b/mycroft/res/text/pt-pt/time.changed.reboot.dialog deleted file mode 100644 index c4a7f239f4d0..000000000000 --- a/mycroft/res/text/pt-pt/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Acabei de sincronizar o meu relógio com a internet e preciso de reiniciar, volto já. \ No newline at end of file diff --git a/mycroft/res/text/ru-ru/and.word b/mycroft/res/text/ru-ru/and.word deleted file mode 100644 index ac3cb06a7e19..000000000000 --- a/mycroft/res/text/ru-ru/and.word +++ /dev/null @@ -1 +0,0 @@ -и diff --git a/mycroft/res/text/ru-ru/backend.down.dialog b/mycroft/res/text/ru-ru/backend.down.dialog deleted file mode 100644 index 7e5f2612ffe2..000000000000 --- a/mycroft/res/text/ru-ru/backend.down.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Испытываю затруднения с поключением к серверам Mycroft. Подождите несколько минут, а потом можете спросить меня снова. -Испытываю затруднения с поключением к серверам Mycroft. Пожалуйста, дайте мне пару минут, а потом можете спросить снова. -Похоже я не могу подключиться к серверам Mycroft. Подождите несколько минут, а потом можете спросить меня снова. -Похоже я не могу подключиться к серверам Mycroft. Пожалуйста, дайте мне пару минут, а потом можете спросить снова. diff --git a/mycroft/res/text/ru-ru/cancel.voc b/mycroft/res/text/ru-ru/cancel.voc deleted file mode 100644 index 38dfcfa0f533..000000000000 --- a/mycroft/res/text/ru-ru/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -отмена -не важно -ну и ладно diff --git a/mycroft/res/text/ru-ru/checking for updates.dialog b/mycroft/res/text/ru-ru/checking for updates.dialog deleted file mode 100644 index 53beb71e7b89..000000000000 --- a/mycroft/res/text/ru-ru/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Проверяю обновления -Подождите минутку, я всё ещё обновляюсь diff --git a/mycroft/res/text/ru-ru/common_play.voc b/mycroft/res/text/ru-ru/common_play.voc deleted file mode 100644 index 2bcb0eaa10c5..000000000000 --- a/mycroft/res/text/ru-ru/common_play.voc +++ /dev/null @@ -1,13 +0,0 @@ -играть -воспроизводить -воспроизведение -слушать -проигрывать -проигрывание -прослушивание -играющая -включить -запустить -запускать -включать -OCP diff --git a/mycroft/res/text/ru-ru/day.word b/mycroft/res/text/ru-ru/day.word deleted file mode 100644 index bcb325ebc0d8..000000000000 --- a/mycroft/res/text/ru-ru/day.word +++ /dev/null @@ -1 +0,0 @@ -день diff --git a/mycroft/res/text/ru-ru/days.word b/mycroft/res/text/ru-ru/days.word deleted file mode 100644 index d170fff4f8d9..000000000000 --- a/mycroft/res/text/ru-ru/days.word +++ /dev/null @@ -1 +0,0 @@ -дней diff --git a/mycroft/res/text/ru-ru/hour.word b/mycroft/res/text/ru-ru/hour.word deleted file mode 100644 index 4ca5e1683524..000000000000 --- a/mycroft/res/text/ru-ru/hour.word +++ /dev/null @@ -1 +0,0 @@ -час diff --git a/mycroft/res/text/ru-ru/hours.word b/mycroft/res/text/ru-ru/hours.word deleted file mode 100644 index 80c7bead690a..000000000000 --- a/mycroft/res/text/ru-ru/hours.word +++ /dev/null @@ -1 +0,0 @@ -часов diff --git a/mycroft/res/text/ru-ru/i didn't catch that.dialog b/mycroft/res/text/ru-ru/i didn't catch that.dialog deleted file mode 100644 index 6ff607ddf9d2..000000000000 --- a/mycroft/res/text/ru-ru/i didn't catch that.dialog +++ /dev/null @@ -1,5 +0,0 @@ -Извините, мне не понятно -Боюсь, мне не удалось вас понять -Не могли бы вы повторить? -Не могли бы повторить снова? -Повторите ещё раз, пожалуйста diff --git a/mycroft/res/text/ru-ru/last.voc b/mycroft/res/text/ru-ru/last.voc deleted file mode 100644 index 2a00ddbc2df6..000000000000 --- a/mycroft/res/text/ru-ru/last.voc +++ /dev/null @@ -1,4 +0,0 @@ -последний -последний вариант -последний выбор -самый последний diff --git a/mycroft/res/text/ru-ru/learning disabled.dialog b/mycroft/res/text/ru-ru/learning disabled.dialog deleted file mode 100644 index be32bdefc841..000000000000 --- a/mycroft/res/text/ru-ru/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Данные о взаимодействии больше не будут отправляться в Mycroft AI diff --git a/mycroft/res/text/ru-ru/learning enabled.dialog b/mycroft/res/text/ru-ru/learning enabled.dialog deleted file mode 100644 index d8b78d56f90d..000000000000 --- a/mycroft/res/text/ru-ru/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Теперь я загружу данные взаимодействия в Mycroft AI, чтобы стать умнее. В настоящее время это включает записи активации слов для пробуждения diff --git a/mycroft/res/text/ru-ru/message_loading.skills.dialog b/mycroft/res/text/ru-ru/message_loading.skills.dialog deleted file mode 100644 index a9c836f17572..000000000000 --- a/mycroft/res/text/ru-ru/message_loading.skills.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < ЗАГРУЗКА < < < diff --git a/mycroft/res/text/ru-ru/message_rebooting.dialog b/mycroft/res/text/ru-ru/message_rebooting.dialog deleted file mode 100644 index d8fd8bcac96c..000000000000 --- a/mycroft/res/text/ru-ru/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -ПЕРЕЗАГРУЗКА... diff --git a/mycroft/res/text/ru-ru/message_synching.clock.dialog b/mycroft/res/text/ru-ru/message_synching.clock.dialog deleted file mode 100644 index 756d0a5157bf..000000000000 --- a/mycroft/res/text/ru-ru/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < СИХРОНИЗАЦИЯ < < < diff --git a/mycroft/res/text/ru-ru/message_updating.dialog b/mycroft/res/text/ru-ru/message_updating.dialog deleted file mode 100644 index 6c4f859d81ab..000000000000 --- a/mycroft/res/text/ru-ru/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < ОБНОВЛЕНИЕ < < < diff --git a/mycroft/res/text/ru-ru/minute.word b/mycroft/res/text/ru-ru/minute.word deleted file mode 100644 index 8a4bf4258043..000000000000 --- a/mycroft/res/text/ru-ru/minute.word +++ /dev/null @@ -1 +0,0 @@ -минута diff --git a/mycroft/res/text/ru-ru/minutes.word b/mycroft/res/text/ru-ru/minutes.word deleted file mode 100644 index 00b261a43f85..000000000000 --- a/mycroft/res/text/ru-ru/minutes.word +++ /dev/null @@ -1 +0,0 @@ -минут diff --git a/mycroft/res/text/ru-ru/mycroft.intro.dialog b/mycroft/res/text/ru-ru/mycroft.intro.dialog deleted file mode 100644 index 5bb50486f8e7..000000000000 --- a/mycroft/res/text/ru-ru/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Привет, я Майкрофт, ваш новый ассистент. Для помощи вам мне нужно подключиться к интернету. Вы можете подключить меня к сетевому кабелю или использовать Wi-Fi. Следуйте этим инструкциям для подключения Wi-Fi: diff --git a/mycroft/res/text/ru-ru/no.voc b/mycroft/res/text/ru-ru/no.voc deleted file mode 100644 index ec81ed4177f5..000000000000 --- a/mycroft/res/text/ru-ru/no.voc +++ /dev/null @@ -1,4 +0,0 @@ -нет -не-а -нет -отказ diff --git a/mycroft/res/text/ru-ru/not connected to the internet.dialog b/mycroft/res/text/ru-ru/not connected to the internet.dialog deleted file mode 100644 index 2f07c46b04f5..000000000000 --- a/mycroft/res/text/ru-ru/not connected to the internet.dialog +++ /dev/null @@ -1,5 +0,0 @@ -Кажется, у меня нет подключения к интернету. Проверьте соединение, пожалуйста -Похоже, у меня нет подключения к интернету. Проверьте соединение, пожалуйста -Не могу подключиться к интернету. Проверьте соединение, пожалуйста -Не могу попасть в интернет. Проверьте соединение, пожалуйста -У меня проблема с подключением к интернету. Проверьте соединение, пожалуйста diff --git a/mycroft/res/text/ru-ru/not.loaded.dialog b/mycroft/res/text/ru-ru/not.loaded.dialog deleted file mode 100644 index a060926e2504..000000000000 --- a/mycroft/res/text/ru-ru/not.loaded.dialog +++ /dev/null @@ -1 +0,0 @@ -Подождите минутку, пока я закончу загружаться diff --git a/mycroft/res/text/ru-ru/or.word b/mycroft/res/text/ru-ru/or.word deleted file mode 100644 index 7feb2cb8b178..000000000000 --- a/mycroft/res/text/ru-ru/or.word +++ /dev/null @@ -1 +0,0 @@ -или diff --git a/mycroft/res/text/ru-ru/phonetic_spellings.txt b/mycroft/res/text/ru-ru/phonetic_spellings.txt deleted file mode 100644 index 453b5772efe8..000000000000 --- a/mycroft/res/text/ru-ru/phonetic_spellings.txt +++ /dev/null @@ -1,19 +0,0 @@ -ai: эй-ай -duckduckgo: дак-дак-гоу -fairytalez: фэйри-тэйлс -homeassistant: хоум-ассистант -iot: ай-оу-ти -lifx: лайф-икс -mycroft: май-крафт -mycroftai: май-крафт эй-ай -myepisodes: май-эпизодс -spotify: споти-фай -ssh: эс-эс-эйч -wifi: вай-фай -wi-fi: вай-фай -wikiquote: вики-квоут -майкрофт: май-крафт -майкрофта: май-крафта -майкрофте: май-крафте -майкрофтом: май-крафтом -майкрофту: май-крафту diff --git a/mycroft/res/text/ru-ru/reset to factory defaults.dialog b/mycroft/res/text/ru-ru/reset to factory defaults.dialog deleted file mode 100644 index e2b7310c5aa2..000000000000 --- a/mycroft/res/text/ru-ru/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Меня сбросили до заводских настроек diff --git a/mycroft/res/text/ru-ru/second.word b/mycroft/res/text/ru-ru/second.word deleted file mode 100644 index f1be0808f007..000000000000 --- a/mycroft/res/text/ru-ru/second.word +++ /dev/null @@ -1 +0,0 @@ -секунда diff --git a/mycroft/res/text/ru-ru/seconds.word b/mycroft/res/text/ru-ru/seconds.word deleted file mode 100644 index ba1da0d73ed6..000000000000 --- a/mycroft/res/text/ru-ru/seconds.word +++ /dev/null @@ -1 +0,0 @@ -секунд diff --git a/mycroft/res/text/ru-ru/skill.error.dialog b/mycroft/res/text/ru-ru/skill.error.dialog deleted file mode 100644 index 22e0de8ac6f2..000000000000 --- a/mycroft/res/text/ru-ru/skill.error.dialog +++ /dev/null @@ -1 +0,0 @@ -Во время обработки запроса в {{skill}} прозошла ошибка diff --git a/mycroft/res/text/ru-ru/skills updated.dialog b/mycroft/res/text/ru-ru/skills updated.dialog deleted file mode 100644 index 9c77c88ee8c7..000000000000 --- a/mycroft/res/text/ru-ru/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Теперь я в актуальном состоянии -Умения обновлены. Хотите я помогу вам? diff --git a/mycroft/res/text/ru-ru/sorry I couldn't install default skills.dialog b/mycroft/res/text/ru-ru/sorry I couldn't install default skills.dialog deleted file mode 100644 index 699f678fe20f..000000000000 --- a/mycroft/res/text/ru-ru/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -При обновлении тем оформления произошла ошибка diff --git a/mycroft/res/text/ru-ru/ssh disabled.dialog b/mycroft/res/text/ru-ru/ssh disabled.dialog deleted file mode 100644 index 1fe44f90df0b..000000000000 --- a/mycroft/res/text/ru-ru/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Логин по SSH был отключён diff --git a/mycroft/res/text/ru-ru/ssh enabled.dialog b/mycroft/res/text/ru-ru/ssh enabled.dialog deleted file mode 100644 index fb5fa0458ab2..000000000000 --- a/mycroft/res/text/ru-ru/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Логин по SSH теперь разрешён diff --git a/mycroft/res/text/ru-ru/time.changed.reboot.dialog b/mycroft/res/text/ru-ru/time.changed.reboot.dialog deleted file mode 100644 index 2906925976c0..000000000000 --- a/mycroft/res/text/ru-ru/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -Мне нужно перезагрузиться после синхронизации часов с интернетом, скоро вернусь diff --git a/mycroft/res/text/ru-ru/yes.voc b/mycroft/res/text/ru-ru/yes.voc deleted file mode 100644 index a88d0ad17314..000000000000 --- a/mycroft/res/text/ru-ru/yes.voc +++ /dev/null @@ -1,4 +0,0 @@ -ага -да -конечно -пожалуйста diff --git a/mycroft/res/text/sv-fi/cancel.voc b/mycroft/res/text/sv-fi/cancel.voc deleted file mode 100644 index 585d21f73e60..000000000000 --- a/mycroft/res/text/sv-fi/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -avbryt -strunt i det -glöm det diff --git a/mycroft/res/text/sv-fi/checking for updates.dialog b/mycroft/res/text/sv-fi/checking for updates.dialog deleted file mode 100644 index 10180ae36a0a..000000000000 --- a/mycroft/res/text/sv-fi/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Söker efter uppdateringar -Bara ett ögonblick medan jag uppdaterar mig själv diff --git a/mycroft/res/text/sv-fi/common_play.voc b/mycroft/res/text/sv-fi/common_play.voc deleted file mode 100644 index 18185895dac1..000000000000 --- a/mycroft/res/text/sv-fi/common_play.voc +++ /dev/null @@ -1,11 +0,0 @@ -soittaa -soita -soittoa -soittaminen -soittamaan -soittamalla -soittamisesta -käynnistä -käynnistäminen -aloittaa -OCP diff --git a/mycroft/res/text/sv-fi/i didn't catch that.dialog b/mycroft/res/text/sv-fi/i didn't catch that.dialog deleted file mode 100644 index 67b81ad843e9..000000000000 --- a/mycroft/res/text/sv-fi/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Tyvärr, jag uppfattade inte det -Jag är rädd att jag inte kunde förstå det -Kan du säga det igen? -Kan du upprepa det? diff --git a/mycroft/res/text/sv-fi/last.voc b/mycroft/res/text/sv-fi/last.voc deleted file mode 100644 index e34e6c0011ee..000000000000 --- a/mycroft/res/text/sv-fi/last.voc +++ /dev/null @@ -1,3 +0,0 @@ -last -viimeinen -viimeisin diff --git a/mycroft/res/text/sv-fi/learning disabled.dialog b/mycroft/res/text/sv-fi/learning disabled.dialog deleted file mode 100644 index 9d51dceeaa3e..000000000000 --- a/mycroft/res/text/sv-fi/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Interaktionsdata kommer inte längre att skickas till Mycroft AI. diff --git a/mycroft/res/text/sv-fi/learning enabled.dialog b/mycroft/res/text/sv-fi/learning enabled.dialog deleted file mode 100644 index 34faa2509b95..000000000000 --- a/mycroft/res/text/sv-fi/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Jag ska nu ladda upp interaktionsdata till Mycroft AI så att jag kan bli smartare. För närvarande inkluderar detta inspelningar av vaknaord aktiveringar. diff --git a/mycroft/res/text/sv-fi/message_rebooting.dialog b/mycroft/res/text/sv-fi/message_rebooting.dialog deleted file mode 100644 index 4f9c48bb2f37..000000000000 --- a/mycroft/res/text/sv-fi/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -STARTAR OM... diff --git a/mycroft/res/text/sv-fi/message_synching.clock.dialog b/mycroft/res/text/sv-fi/message_synching.clock.dialog deleted file mode 100644 index 1d3c237965a9..000000000000 --- a/mycroft/res/text/sv-fi/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNKRONISERA < < < diff --git a/mycroft/res/text/sv-fi/message_updating.dialog b/mycroft/res/text/sv-fi/message_updating.dialog deleted file mode 100644 index 63bf22b718ad..000000000000 --- a/mycroft/res/text/sv-fi/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < UPPDATERAR < < < diff --git a/mycroft/res/text/sv-fi/mycroft.intro.dialog b/mycroft/res/text/sv-fi/mycroft.intro.dialog deleted file mode 100644 index 8e2e12d27f00..000000000000 --- a/mycroft/res/text/sv-fi/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Hej jag är Mycroft, din nya assistent. För att hjälpa dig behöver jag vara ansluten till internet. Du kan antingen ansluta mig med en nätverkskabel eller använda wifi. Följ dessa instruktioner för att konfigurera wifi: diff --git a/mycroft/res/text/sv-fi/not connected to the internet.dialog b/mycroft/res/text/sv-fi/not connected to the internet.dialog deleted file mode 100644 index 4d2a6252d3c1..000000000000 --- a/mycroft/res/text/sv-fi/not connected to the internet.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Det verkar som om jag inte är ansluten till Internet -Jag verkar inte vara ansluten till internet -Jag kan inte nå internet just nu -Jag kan inte nå internet diff --git a/mycroft/res/text/sv-fi/phonetic_spellings.txt b/mycroft/res/text/sv-fi/phonetic_spellings.txt deleted file mode 100644 index f5d4d74280a3..000000000000 --- a/mycroft/res/text/sv-fi/phonetic_spellings.txt +++ /dev/null @@ -1,2 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. diff --git a/mycroft/res/text/sv-fi/reset to factory defaults.dialog b/mycroft/res/text/sv-fi/reset to factory defaults.dialog deleted file mode 100644 index 8a975307230b..000000000000 --- a/mycroft/res/text/sv-fi/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Jag har återställts till fabriksinställningar. diff --git a/mycroft/res/text/sv-fi/skills updated.dialog b/mycroft/res/text/sv-fi/skills updated.dialog deleted file mode 100644 index b74e9cf1343d..000000000000 --- a/mycroft/res/text/sv-fi/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Jag är uppdaterad nu -Färdigheter Uppdaterade. Jag är redo att hjälpa dig. diff --git a/mycroft/res/text/sv-fi/sorry I couldn't install default skills.dialog b/mycroft/res/text/sv-fi/sorry I couldn't install default skills.dialog deleted file mode 100644 index 1102c86ecb6b..000000000000 --- a/mycroft/res/text/sv-fi/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -ett fel uppstod vid uppdatering av färdigheter diff --git a/mycroft/res/text/sv-fi/ssh disabled.dialog b/mycroft/res/text/sv-fi/ssh disabled.dialog deleted file mode 100644 index a561f9e334f2..000000000000 --- a/mycroft/res/text/sv-fi/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH-inloggning har inaktiverats diff --git a/mycroft/res/text/sv-fi/ssh enabled.dialog b/mycroft/res/text/sv-fi/ssh enabled.dialog deleted file mode 100644 index 52c84b8cb05b..000000000000 --- a/mycroft/res/text/sv-fi/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH-inloggningar är nu tillåtna diff --git a/mycroft/res/text/sv-fi/time.changed.reboot.dialog b/mycroft/res/text/sv-fi/time.changed.reboot.dialog deleted file mode 100644 index a99c12c61e68..000000000000 --- a/mycroft/res/text/sv-fi/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -jag måste starta om efter att ha synkroniserat min klocka med internet, är snart tillbaka. diff --git a/mycroft/res/text/sv-se/cancel.voc b/mycroft/res/text/sv-se/cancel.voc deleted file mode 100644 index 318621f44adb..000000000000 --- a/mycroft/res/text/sv-se/cancel.voc +++ /dev/null @@ -1,3 +0,0 @@ -avbryt -strunta i det -glöm det diff --git a/mycroft/res/text/sv-se/checking for updates.dialog b/mycroft/res/text/sv-se/checking for updates.dialog deleted file mode 100644 index 10180ae36a0a..000000000000 --- a/mycroft/res/text/sv-se/checking for updates.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Söker efter uppdateringar -Bara ett ögonblick medan jag uppdaterar mig själv diff --git a/mycroft/res/text/sv-se/common_play.voc b/mycroft/res/text/sv-se/common_play.voc deleted file mode 100644 index b2b6c0da9d74..000000000000 --- a/mycroft/res/text/sv-se/common_play.voc +++ /dev/null @@ -1,4 +0,0 @@ -spela -uppspelning -starta -OCP diff --git a/mycroft/res/text/sv-se/day.word b/mycroft/res/text/sv-se/day.word deleted file mode 100644 index 12ad2aee7d5f..000000000000 --- a/mycroft/res/text/sv-se/day.word +++ /dev/null @@ -1 +0,0 @@ -dag diff --git a/mycroft/res/text/sv-se/days.word b/mycroft/res/text/sv-se/days.word deleted file mode 100644 index c4dbf3e84a5e..000000000000 --- a/mycroft/res/text/sv-se/days.word +++ /dev/null @@ -1 +0,0 @@ -dagar diff --git a/mycroft/res/text/sv-se/hour.word b/mycroft/res/text/sv-se/hour.word deleted file mode 100644 index ba2c26d5630e..000000000000 --- a/mycroft/res/text/sv-se/hour.word +++ /dev/null @@ -1 +0,0 @@ -timme diff --git a/mycroft/res/text/sv-se/hours.word b/mycroft/res/text/sv-se/hours.word deleted file mode 100644 index 9a7aac047bc2..000000000000 --- a/mycroft/res/text/sv-se/hours.word +++ /dev/null @@ -1 +0,0 @@ -timmar diff --git a/mycroft/res/text/sv-se/i didn't catch that.dialog b/mycroft/res/text/sv-se/i didn't catch that.dialog deleted file mode 100644 index 67b81ad843e9..000000000000 --- a/mycroft/res/text/sv-se/i didn't catch that.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Tyvärr, jag uppfattade inte det -Jag är rädd att jag inte kunde förstå det -Kan du säga det igen? -Kan du upprepa det? diff --git a/mycroft/res/text/sv-se/last.voc b/mycroft/res/text/sv-se/last.voc deleted file mode 100644 index 14efd29bff7b..000000000000 --- a/mycroft/res/text/sv-se/last.voc +++ /dev/null @@ -1 +0,0 @@ -senast diff --git a/mycroft/res/text/sv-se/learning disabled.dialog b/mycroft/res/text/sv-se/learning disabled.dialog deleted file mode 100644 index 9d51dceeaa3e..000000000000 --- a/mycroft/res/text/sv-se/learning disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Interaktionsdata kommer inte längre att skickas till Mycroft AI. diff --git a/mycroft/res/text/sv-se/learning enabled.dialog b/mycroft/res/text/sv-se/learning enabled.dialog deleted file mode 100644 index c1078fbe479a..000000000000 --- a/mycroft/res/text/sv-se/learning enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -Jag kommer nu ladda upp interaktionsdata till Mycroft AI så att jag kan bli smartare. För närvarande inkluderar detta inspelningar av väckningsord. diff --git a/mycroft/res/text/sv-se/message_rebooting.dialog b/mycroft/res/text/sv-se/message_rebooting.dialog deleted file mode 100644 index 4f9c48bb2f37..000000000000 --- a/mycroft/res/text/sv-se/message_rebooting.dialog +++ /dev/null @@ -1 +0,0 @@ -STARTAR OM... diff --git a/mycroft/res/text/sv-se/message_synching.clock.dialog b/mycroft/res/text/sv-se/message_synching.clock.dialog deleted file mode 100644 index 1d3c237965a9..000000000000 --- a/mycroft/res/text/sv-se/message_synching.clock.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < SYNKRONISERA < < < diff --git a/mycroft/res/text/sv-se/message_updating.dialog b/mycroft/res/text/sv-se/message_updating.dialog deleted file mode 100644 index 63bf22b718ad..000000000000 --- a/mycroft/res/text/sv-se/message_updating.dialog +++ /dev/null @@ -1 +0,0 @@ -< < < UPPDATERAR < < < diff --git a/mycroft/res/text/sv-se/minute.word b/mycroft/res/text/sv-se/minute.word deleted file mode 100644 index 7a715f81259e..000000000000 --- a/mycroft/res/text/sv-se/minute.word +++ /dev/null @@ -1 +0,0 @@ -minut diff --git a/mycroft/res/text/sv-se/minutes.word b/mycroft/res/text/sv-se/minutes.word deleted file mode 100644 index 19e9917c638c..000000000000 --- a/mycroft/res/text/sv-se/minutes.word +++ /dev/null @@ -1 +0,0 @@ -minuter diff --git a/mycroft/res/text/sv-se/mycroft.intro.dialog b/mycroft/res/text/sv-se/mycroft.intro.dialog deleted file mode 100644 index 8e2e12d27f00..000000000000 --- a/mycroft/res/text/sv-se/mycroft.intro.dialog +++ /dev/null @@ -1 +0,0 @@ -Hej jag är Mycroft, din nya assistent. För att hjälpa dig behöver jag vara ansluten till internet. Du kan antingen ansluta mig med en nätverkskabel eller använda wifi. Följ dessa instruktioner för att konfigurera wifi: diff --git a/mycroft/res/text/sv-se/no.voc b/mycroft/res/text/sv-se/no.voc deleted file mode 100644 index 01a6375e1cc2..000000000000 --- a/mycroft/res/text/sv-se/no.voc +++ /dev/null @@ -1,4 +0,0 @@ -nej -nix -nepp -negativt diff --git a/mycroft/res/text/sv-se/not connected to the internet.dialog b/mycroft/res/text/sv-se/not connected to the internet.dialog deleted file mode 100644 index 4d2a6252d3c1..000000000000 --- a/mycroft/res/text/sv-se/not connected to the internet.dialog +++ /dev/null @@ -1,4 +0,0 @@ -Det verkar som om jag inte är ansluten till Internet -Jag verkar inte vara ansluten till internet -Jag kan inte nå internet just nu -Jag kan inte nå internet diff --git a/mycroft/res/text/sv-se/phonetic_spellings.txt b/mycroft/res/text/sv-se/phonetic_spellings.txt deleted file mode 100644 index f5d4d74280a3..000000000000 --- a/mycroft/res/text/sv-se/phonetic_spellings.txt +++ /dev/null @@ -1,2 +0,0 @@ -jalepeno: hallipeenyo -ai: A.I. diff --git a/mycroft/res/text/sv-se/reset to factory defaults.dialog b/mycroft/res/text/sv-se/reset to factory defaults.dialog deleted file mode 100644 index 8a975307230b..000000000000 --- a/mycroft/res/text/sv-se/reset to factory defaults.dialog +++ /dev/null @@ -1 +0,0 @@ -Jag har återställts till fabriksinställningar. diff --git a/mycroft/res/text/sv-se/second.word b/mycroft/res/text/sv-se/second.word deleted file mode 100644 index bbf810ee47db..000000000000 --- a/mycroft/res/text/sv-se/second.word +++ /dev/null @@ -1 +0,0 @@ -sekund diff --git a/mycroft/res/text/sv-se/seconds.word b/mycroft/res/text/sv-se/seconds.word deleted file mode 100644 index 5256c15dd54b..000000000000 --- a/mycroft/res/text/sv-se/seconds.word +++ /dev/null @@ -1 +0,0 @@ -sekunder diff --git a/mycroft/res/text/sv-se/skills updated.dialog b/mycroft/res/text/sv-se/skills updated.dialog deleted file mode 100644 index b74e9cf1343d..000000000000 --- a/mycroft/res/text/sv-se/skills updated.dialog +++ /dev/null @@ -1,2 +0,0 @@ -Jag är uppdaterad nu -Färdigheter Uppdaterade. Jag är redo att hjälpa dig. diff --git a/mycroft/res/text/sv-se/sorry I couldn't install default skills.dialog b/mycroft/res/text/sv-se/sorry I couldn't install default skills.dialog deleted file mode 100644 index 1102c86ecb6b..000000000000 --- a/mycroft/res/text/sv-se/sorry I couldn't install default skills.dialog +++ /dev/null @@ -1 +0,0 @@ -ett fel uppstod vid uppdatering av färdigheter diff --git a/mycroft/res/text/sv-se/ssh disabled.dialog b/mycroft/res/text/sv-se/ssh disabled.dialog deleted file mode 100644 index a561f9e334f2..000000000000 --- a/mycroft/res/text/sv-se/ssh disabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH-inloggning har inaktiverats diff --git a/mycroft/res/text/sv-se/ssh enabled.dialog b/mycroft/res/text/sv-se/ssh enabled.dialog deleted file mode 100644 index 52c84b8cb05b..000000000000 --- a/mycroft/res/text/sv-se/ssh enabled.dialog +++ /dev/null @@ -1 +0,0 @@ -SSH-inloggningar är nu tillåtna diff --git a/mycroft/res/text/sv-se/time.changed.reboot.dialog b/mycroft/res/text/sv-se/time.changed.reboot.dialog deleted file mode 100644 index a99c12c61e68..000000000000 --- a/mycroft/res/text/sv-se/time.changed.reboot.dialog +++ /dev/null @@ -1 +0,0 @@ -jag måste starta om efter att ha synkroniserat min klocka med internet, är snart tillbaka. diff --git a/mycroft/res/text/sv-se/yes.voc b/mycroft/res/text/sv-se/yes.voc deleted file mode 100644 index 8f8a020847a2..000000000000 --- a/mycroft/res/text/sv-se/yes.voc +++ /dev/null @@ -1,5 +0,0 @@ -ja -japp -jepp -visst -är du snäll diff --git a/mycroft/res/text/tr-tr/common_play.voc b/mycroft/res/text/tr-tr/common_play.voc deleted file mode 100644 index 99b8cd57ee3f..000000000000 --- a/mycroft/res/text/tr-tr/common_play.voc +++ /dev/null @@ -1,8 +0,0 @@ -çal -çalma -çalmak -çalın -yapmak -başlat -başla -OCP diff --git a/mycroft/res/text/tr-tr/day.word b/mycroft/res/text/tr-tr/day.word deleted file mode 100644 index 9832baf25709..000000000000 --- a/mycroft/res/text/tr-tr/day.word +++ /dev/null @@ -1 +0,0 @@ -gün diff --git a/mycroft/res/text/tr-tr/days.word b/mycroft/res/text/tr-tr/days.word deleted file mode 100644 index ed16a304a93e..000000000000 --- a/mycroft/res/text/tr-tr/days.word +++ /dev/null @@ -1 +0,0 @@ -günler diff --git a/mycroft/res/text/tr-tr/hour.word b/mycroft/res/text/tr-tr/hour.word deleted file mode 100644 index 08bcc920d084..000000000000 --- a/mycroft/res/text/tr-tr/hour.word +++ /dev/null @@ -1 +0,0 @@ -saat diff --git a/mycroft/res/text/tr-tr/hours.word b/mycroft/res/text/tr-tr/hours.word deleted file mode 100644 index 9f39470bff0d..000000000000 --- a/mycroft/res/text/tr-tr/hours.word +++ /dev/null @@ -1 +0,0 @@ -saatler diff --git a/mycroft/res/text/tr-tr/last.voc b/mycroft/res/text/tr-tr/last.voc deleted file mode 100644 index 72e967ccaa5b..000000000000 --- a/mycroft/res/text/tr-tr/last.voc +++ /dev/null @@ -1 +0,0 @@ -son diff --git a/mycroft/res/text/tr-tr/minute.word b/mycroft/res/text/tr-tr/minute.word deleted file mode 100644 index f84ec6c8ac19..000000000000 --- a/mycroft/res/text/tr-tr/minute.word +++ /dev/null @@ -1 +0,0 @@ -dakika diff --git a/mycroft/res/text/tr-tr/minutes.word b/mycroft/res/text/tr-tr/minutes.word deleted file mode 100644 index da54805129a7..000000000000 --- a/mycroft/res/text/tr-tr/minutes.word +++ /dev/null @@ -1 +0,0 @@ -dakikalar diff --git a/mycroft/res/text/tr-tr/no.voc b/mycroft/res/text/tr-tr/no.voc deleted file mode 100644 index 26ed9a37dd25..000000000000 --- a/mycroft/res/text/tr-tr/no.voc +++ /dev/null @@ -1,4 +0,0 @@ -hayır -yok -hayır -olumsuz diff --git a/mycroft/res/text/tr-tr/second.word b/mycroft/res/text/tr-tr/second.word deleted file mode 100644 index ec584008030f..000000000000 --- a/mycroft/res/text/tr-tr/second.word +++ /dev/null @@ -1 +0,0 @@ -saniye diff --git a/mycroft/res/text/tr-tr/seconds.word b/mycroft/res/text/tr-tr/seconds.word deleted file mode 100644 index aa7cfaacab0c..000000000000 --- a/mycroft/res/text/tr-tr/seconds.word +++ /dev/null @@ -1 +0,0 @@ -saniyeler diff --git a/mycroft/res/text/tr-tr/yes.voc b/mycroft/res/text/tr-tr/yes.voc deleted file mode 100644 index a7959da02146..000000000000 --- a/mycroft/res/text/tr-tr/yes.voc +++ /dev/null @@ -1,5 +0,0 @@ -evet -evet -evet -tabiki -lütfen diff --git a/mycroft/res/ui/FeatureRequest.qml b/mycroft/res/ui/FeatureRequest.qml deleted file mode 100644 index 1e83d97feaba..000000000000 --- a/mycroft/res/ui/FeatureRequest.qml +++ /dev/null @@ -1,123 +0,0 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtWebEngine 1.7 -import QtWebChannel 1.0 -import QtQuick.Layouts 1.12 -import org.kde.kirigami 2.11 as Kirigami - -Item { - property var requestedFeature; - property url securityOrigin; - - width: parent.width - height: parent.height - - onRequestedFeatureChanged: { - message.text = securityOrigin + " has requested access to your " - + message.textForFeature(requestedFeature); - } - - RowLayout { - anchors.fill: parent - - Label { - id: message - Layout.fillWidth: true - Layout.leftMargin: Kirigami.Units.largeSpacing - wrapMode: Text.WordWrap - maximumLineCount: 2 - elide: Text.ElideRight - - function textForFeature(feature) { - if (feature === WebEngineView.MediaAudioCapture) - return "microphone" - if (feature === WebEngineView.MediaVideoCapture) - return "camera" - if (feature === WebEngineView.MediaAudioVideoCapture) - return "camera and microphone" - if (feature === WebEngineView.Geolocation) - return "location" - } - } - - Button { - id: acceptButton - Layout.alignment: Qt.AlignRight - Layout.preferredWidth: parent.width * 0.18 - - background: Rectangle { - color: acceptButton.activeFocus ? Kirigami.Theme.highlightColor : Qt.lighter(Kirigami.Theme.backgroundColor, 1.2) - border.color: Kirigami.Theme.disabledTextColor - radius: 20 - } - - contentItem: Item { - Kirigami.Heading { - level: 3 - font.pixelSize: parent.width * 0.075 - anchors.centerIn: parent - text: "Accept" - } - } - - onClicked: { - webview.grantFeaturePermission(securityOrigin, - requestedFeature, true); - interactionBar.isRequested = false; - } - } - - Button { - id: denyButton - Layout.alignment: Qt.AlignRight - Layout.preferredWidth: parent.width * 0.18 - - background: Rectangle { - color: denyButton.activeFocus ? Kirigami.Theme.highlightColor : Qt.lighter(Kirigami.Theme.backgroundColor, 1.2) - border.color: Kirigami.Theme.disabledTextColor - radius: 20 - } - - contentItem: Item { - Kirigami.Heading { - level: 3 - font.pixelSize: parent.width * 0.075 - anchors.centerIn: parent - text: "Deny" - } - } - - onClicked: { - webview.grantFeaturePermission(securityOrigin, - requestedFeature, false); - interactionBar.isRequested = false - } - } - - Button { - id: closeButton - Layout.alignment: Qt.AlignRight - Layout.preferredWidth: Kirigami.Units.iconSizes.large - (Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing) - Layout.preferredHeight: Kirigami.Units.iconSizes.large - (Kirigami.Units.largeSpacing + Kirigami.Units.smallSpacing) - Layout.leftMargin: Kirigami.Units.largeSpacing - Layout.rightMargin: Kirigami.Units.largeSpacing - - background: Rectangle { - color: denyButton.activeFocus ? Kirigami.Theme.highlightColor : Qt.lighter(Kirigami.Theme.backgroundColor, 1.2) - border.color: Kirigami.Theme.disabledTextColor - radius: 200 - } - - Kirigami.Icon { - anchors.centerIn: parent - width: Kirigami.Units.iconSizes.medium - height: Kirigami.Units.iconSizes.medium - source: "window-close" - } - - onClicked: { - interactionBar.isRequested = false - } - } - } -} diff --git a/mycroft/res/ui/RequestHandler.qml b/mycroft/res/ui/RequestHandler.qml deleted file mode 100644 index 995151072fc1..000000000000 --- a/mycroft/res/ui/RequestHandler.qml +++ /dev/null @@ -1,35 +0,0 @@ -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtWebEngine 1.7 -import QtWebChannel 1.0 -import QtQuick.Layouts 1.12 -import org.kde.kirigami 2.11 as Kirigami - -Rectangle { - property bool isRequested: false - property alias source: interactionLoader.source - property alias interactionItem: interactionLoader.item - - visible: isRequested - enabled: isRequested - width: parent.width - height: isRequested ? Kirigami.Units.gridUnit * 6 : 0 - color: Kirigami.Theme.backgroundColor - - function setSource(interactionSource){ - interactionLoader.setSource(interactionSource) - } - - Keys.onEscapePressed: { - isRequested = false; - } - - Keys.onBackPressed: { - isRequested = false; - } - - Loader { - id: interactionLoader - anchors.fill: parent - } -} diff --git a/mycroft/res/ui/SYSTEM_AdditionalSettings.qml b/mycroft/res/ui/SYSTEM_AdditionalSettings.qml deleted file mode 100644 index 9f55318d3258..000000000000 --- a/mycroft/res/ui/SYSTEM_AdditionalSettings.qml +++ /dev/null @@ -1,60 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.5 as Kirigami -import Mycroft 1.0 as Mycroft -import QtGraphicalEffects 1.12 - -Mycroft.Delegate { - id: mainLoaderView - property var pageToLoad: sessionData.state - property var idleScreenList: sessionData.idleScreenList - property var activeIdle: sessionData.selectedScreen - property var imageUrl - - function getCurrentWallpaper() { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.get.wallpaper", {}) - } - - Component.onCompleted: { - getCurrentWallpaper() - } - - Connections { - target: Mycroft.MycroftController - onIntentRecevied: { - if (type == "ovos.wallpaper.manager.get.wallpaper.response") { - imageUrl = data.url - } - if (type == "homescreen.wallpaper.set") { - imageUrl = data.url - } - } - } - - background: Item { - Image { - id: bgModelImage - anchors.fill: parent - source: Qt.resolvedUrl(mainLoaderView.imageUrl) - fillMode: Image.PreserveAspectCrop - } - - Rectangle { - anchors.fill: parent - color: Kirigami.Theme.backgroundColor - opacity: 0.6 - z: 1 - } - } - - contentItem: Loader { - id: rootLoader - z: 2 - } - - onPageToLoadChanged: { - console.log(sessionData.state) - rootLoader.setSource(sessionData.state + ".qml") - } -} diff --git a/mycroft/res/ui/SYSTEM_AnimatedImageFrame.qml b/mycroft/res/ui/SYSTEM_AnimatedImageFrame.qml deleted file mode 100644 index 1df514cf9099..000000000000 --- a/mycroft/res/ui/SYSTEM_AnimatedImageFrame.qml +++ /dev/null @@ -1,83 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.4 as Kirigami - -import Mycroft 1.0 as Mycroft - -Mycroft.Delegate { - id: systemImageFrame - skillBackgroundColorOverlay: sessionData.background_color ? sessionData.background_color : "#000000" - property bool hasTitle: sessionData.title.length > 0 ? true : false - property bool hasCaption: sessionData.caption.length > 0 ? true : false - - ColumnLayout { - id: systemImageFrameLayout - anchors.fill: parent - - Kirigami.Heading { - id: systemImageTitle - visible: hasTitle - enabled: hasTitle - Layout.fillWidth: true - Layout.preferredHeight: paintedHeight + Kirigami.Units.largeSpacing - level: 3 - text: sessionData.title - wrapMode: Text.Wrap - font.family: "Noto Sans" - font.weight: Font.Bold - } - - AnimatedImage { - id: systemImageDisplay - visible: true - enabled: true - Layout.fillWidth: true - Layout.fillHeight: true - source: sessionData.image - property var fill: sessionData.fill - - onFillChanged: { - console.log(fill) - if(fill == "PreserveAspectCrop"){ - systemImageDisplay.fillMode = 2 - } else if (fill == "PreserveAspectFit"){ - console.log("inFit") - systemImageDisplay.fillMode = 1 - } else if (fill == "Stretch"){ - systemImageDisplay.fillMode = 0 - } else { - systemImageDisplay.fillMode = 0 - } - } - - - Rectangle { - id: systemImageCaptionBox - visible: hasCaption - enabled: hasCaption - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - height: systemImageCaption.paintedHeight - color: "#95000000" - - Kirigami.Heading { - id: systemImageCaption - level: 2 - anchors.left: parent.left - anchors.leftMargin: Kirigami.Units.largeSpacing - anchors.right: parent.right - anchors.rightMargin: Kirigami.Units.largeSpacing - anchors.verticalCenter: parent.verticalCenter - text: sessionData.caption - wrapMode: Text.Wrap - font.family: "Noto Sans" - font.weight: Font.Bold - } - } - } - } -} - - diff --git a/mycroft/res/ui/SYSTEM_HtmlFrame.qml b/mycroft/res/ui/SYSTEM_HtmlFrame.qml deleted file mode 100644 index fb5dcc6aa348..000000000000 --- a/mycroft/res/ui/SYSTEM_HtmlFrame.qml +++ /dev/null @@ -1,20 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.4 as Kirigami - -import Mycroft 1.0 as Mycroft - -Mycroft.Delegate { - id: systemHtmlFrame - skillBackgroundColorOverlay: "#000000" - - Loader { - id: webViewHtmlLoader - source: "WebViewHtmlFrame.qml" - anchors.fill: parent - property var pageHtml: sessionData.html - property var resourceLocation: sessionData.resourceLocation - } -} - diff --git a/mycroft/res/ui/SYSTEM_ImageFrame.qml b/mycroft/res/ui/SYSTEM_ImageFrame.qml deleted file mode 100644 index 7eb8ba423b9d..000000000000 --- a/mycroft/res/ui/SYSTEM_ImageFrame.qml +++ /dev/null @@ -1,83 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.4 as Kirigami - -import Mycroft 1.0 as Mycroft - -Mycroft.Delegate { - id: systemImageFrame - skillBackgroundColorOverlay: sessionData.background_color ? sessionData.background_color : "#000000" - property bool hasTitle: sessionData.title.length > 0 ? true : false - property bool hasCaption: sessionData.caption.length > 0 ? true : false - - ColumnLayout { - id: systemImageFrameLayout - anchors.fill: parent - - Kirigami.Heading { - id: systemImageTitle - visible: hasTitle - enabled: hasTitle - Layout.fillWidth: true - Layout.preferredHeight: paintedHeight + Kirigami.Units.largeSpacing - level: 3 - text: sessionData.title - wrapMode: Text.Wrap - font.family: "Noto Sans" - font.weight: Font.Bold - } - - Image { - id: systemImageDisplay - visible: true - enabled: true - Layout.fillWidth: true - Layout.fillHeight: true - source: sessionData.image - property var fill: sessionData.fill - - onFillChanged: { - console.log(fill) - if(fill == "PreserveAspectCrop"){ - systemImageDisplay.fillMode = 2 - } else if (fill == "PreserveAspectFit"){ - console.log("inFit") - systemImageDisplay.fillMode = 1 - } else if (fill == "Stretch"){ - systemImageDisplay.fillMode = 0 - } else { - systemImageDisplay.fillMode = 0 - } - } - - - Rectangle { - id: systemImageCaptionBox - visible: hasCaption - enabled: hasCaption - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - height: systemImageCaption.paintedHeight - color: "#95000000" - - Kirigami.Heading { - id: systemImageCaption - level: 2 - anchors.left: parent.left - anchors.leftMargin: Kirigami.Units.largeSpacing - anchors.right: parent.right - anchors.rightMargin: Kirigami.Units.largeSpacing - anchors.verticalCenter: parent.verticalCenter - text: sessionData.caption - wrapMode: Text.Wrap - font.family: "Noto Sans" - font.weight: Font.Bold - } - } - } - } -} - - diff --git a/mycroft/res/ui/SYSTEM_InputBox.qml b/mycroft/res/ui/SYSTEM_InputBox.qml deleted file mode 100644 index f55d8709fe7c..000000000000 --- a/mycroft/res/ui/SYSTEM_InputBox.qml +++ /dev/null @@ -1,73 +0,0 @@ -import QtQuick.Layouts 1.12 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami - -import Mycroft 1.0 as Mycroft - -Mycroft.Delegate { - id: systemInputBoxFrame - property var title: sessionData.title - property var placeholderText: sessionData.placeholder - property var confirmButtonText: sessionData.confirm_text - property var exitButtonText: sessionData.exit_text - property var skillIDHandler: sessionData.skill_id_handler - property string responseEvent: "input.box.response" - property string exitEvent: "input.box.close" - - ColumnLayout { - width: parent.width - spacing: Kirigami.Units.gridUnit - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - Layout.fillWidth: true - horizontalAlignment: Text.AlignHCenter - font.bold: true - text: systemInputBoxFrame.title - color: Kirigami.Theme.textColor - } - - TextField { - id: txtField - Kirigami.Theme.colorSet: Kirigami.Theme.View - Layout.fillWidth: true - Layout.leftMargin: Mycroft.Units.gridUnit * 5 - Layout.rightMargin: Mycroft.Units.gridUnit * 5 - Layout.preferredHeight: Mycroft.Units.gridUnit * 4 - placeholderText: systemInputBoxFrame.placeholderText - - onAccepted: { - triggerGuiEvent(systemInputBoxFrame.responseEvent, {"text": txtField.text}) - } - } - - RowLayout { - Layout.alignment: Qt.AlignCenter - Button { - Layout.fillWidth: true - Layout.preferredHeight: Mycroft.Units.gridUnit * 5 - text: systemInputBoxFrame.confirmButtonText - onClicked: { - console.log(systemInputBoxFrame.responseEvent) - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../snd/clicked.wav")) - triggerGuiEvent(systemInputBoxFrame.responseEvent, {"text": txtField.text}) - } - } - - Button { - Layout.fillWidth: true - Layout.preferredHeight: Mycroft.Units.gridUnit * 5 - text: systemInputBoxFrame.exitButtonText - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../snd/clicked.wav")) - triggerGuiEvent(systemInputBoxFrame.exitEvent, {}) - } - } - } - Item { - Layout.fillHeight: true - } - } -} diff --git a/mycroft/res/ui/SYSTEM_TextFrame.qml b/mycroft/res/ui/SYSTEM_TextFrame.qml deleted file mode 100644 index ebe7985ff905..000000000000 --- a/mycroft/res/ui/SYSTEM_TextFrame.qml +++ /dev/null @@ -1,45 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.4 as Kirigami - -import Mycroft 1.0 as Mycroft - -Mycroft.CardDelegate { - id: systemTextFrame - skillBackgroundColorOverlay: "#000000" - cardBackgroundOverlayColor: "#000000" - - property bool hasTitle: sessionData.title.length > 0 ? true : false - - contentItem: Rectangle { - color: "blue" - - ColumnLayout { - anchors.fill: parent - - Mycroft.AutoFitLabel { - id: systemTextFrameTitle - wrapMode: Text.Wrap - visible: hasTitle - enabled: hasTitle - Layout.fillWidth: true - Layout.fillHeight: true - font.family: "Noto Sans" - font.weight: Font.Bold - text: sessionData.title - } - - Mycroft.AutoFitLabel { - id: systemTextFrameMainBody - wrapMode: Text.Wrap - font.family: "Noto Sans" - Layout.fillWidth: true - Layout.fillHeight: true - font.weight: Font.Bold - text: sessionData.text - } - } - } -} - diff --git a/mycroft/res/ui/SYSTEM_UrlFrame.qml b/mycroft/res/ui/SYSTEM_UrlFrame.qml deleted file mode 100644 index 33b197a714ec..000000000000 --- a/mycroft/res/ui/SYSTEM_UrlFrame.qml +++ /dev/null @@ -1,169 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.12 -import org.kde.kirigami 2.11 as Kirigami -import QtWebEngine 1.8 -import Mycroft 1.0 as Mycroft - -Mycroft.AbstractDelegate { - id: systemUrlFrame - property var pageUrl: sessionData.url - - onPageUrlChanged: { - if(typeof pageUrl !== "undefined" || typeof pageUrl !== null){ - webview.url = pageUrl - } - } - - contentItem: Item { - anchors.fill: parent - - Rectangle { - id: blankArea - color: Kirigami.Theme.backgroundColor - height: Mycroft.Units.gridUnit * 2 - anchors.top: parent.top - width: parent.width - } - - SwipeArea { - anchors.top: blankArea.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - preventStealing: true - - Flickable { - id: flickable - clip: true; - anchors.fill: parent - contentHeight: systemUrlFrame.height * 2 - contentWidth: systemUrlFrame.width - - property var storeCHeight - property var storeCWidth - - WebEngineView { - id: webview - anchors.fill : parent; - profile: defaultProfile - - settings.autoLoadImages: true - settings.javascriptEnabled: true - settings.errorPageEnabled: true - settings.pluginsEnabled: true - settings.allowWindowActivationFromJavaScript: true - settings.javascriptCanOpenWindows: true - settings.fullScreenSupportEnabled: true - settings.autoLoadIconsForPage: true - settings.touchIconsEnabled: true - settings.webRTCPublicInterfacesOnly: true - settings.showScrollBars: false - - onNewViewRequested: function(request) { - if (!request.userInitiated) { - console.log("Warning: Blocked a popup window."); - } else if (request.destination === WebEngineView.NewViewInDialog) { - popuproot.open() - request.openIn(popupwebview); - } else { - request.openIn(webview); - } - } - - onJavaScriptDialogRequested: function(request) { - request.accepted = true; - } - - onFeaturePermissionRequested: { - interactionBar.setSource("FeatureRequest.qml") - interactionBar.interactionItem.securityOrigin = securityOrigin; - interactionBar.interactionItem.requestedFeature = feature; - interactionBar.isRequested = true; - } - - onFullScreenRequested: function(request) { - if (request.toggleOn) { - flickable.storeCWidth = flickable.contentWidth - flickable.storeCHeight = flickable.contentHeight - flickable.contentWidth = flickable.width - flickable.contentHeight = flickable.height - } - else { - flickable.contentWidth = flickable.storeCWidth - flickable.contentHeight = flickable.storeCHeight - } - request.accept() - } - - onLoadingChanged: { - if (loadRequest.status !== WebEngineView.LoadSucceededStatus) { - return; - } - - flickable.contentHeight = 0; - flickable.contentWidth = flickable.width; - - runJavaScript ( - "document.documentElement.scrollHeight;", - function (actualPageHeight) { - flickable.contentHeight = Math.max ( - actualPageHeight, flickable.height); - }); - } - } - - WebEngineProfile { - id: defaultProfile - httpUserAgent: "Mozilla/5.0 (Linux; Android 13; Pixel 6a) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36" - } - - onFlickEnded: { - webview.runJavaScript ( - "document.documentElement.scrollHeight;", - function (actualPageHeight) { - flickable.contentHeight = Math.max ( - actualPageHeight, flickable.height); - }); - } - } - - RequestHandler { - id: interactionBar - anchors.top: parent.top - z: 1001 - } - - Popup { - id: popuproot - modal: true - focus: true - width: root.width - Kirigami.Units.largeSpacing * 1.25 - height: root.height - Kirigami.Units.largeSpacing * 1.25 - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent - anchors.centerIn: parent - - WebEngineView { - id: popupwebview - anchors.fill: parent - url: "about:blank" - settings.autoLoadImages: true - settings.javascriptEnabled: true - settings.errorPageEnabled: true - settings.pluginsEnabled: true - settings.allowWindowActivationFromJavaScript: true - settings.javascriptCanOpenWindows: true - settings.fullScreenSupportEnabled: true - settings.autoLoadIconsForPage: true - settings.touchIconsEnabled: true - settings.webRTCPublicInterfacesOnly: true - property string urlalias: popupwebview.url - - onNewViewRequested: function(request) { - console.log(request.destination) - } - } - } - } - } -} diff --git a/mycroft/res/ui/SwipeArea.qml b/mycroft/res/ui/SwipeArea.qml deleted file mode 100644 index a0a29d8ad2b2..000000000000 --- a/mycroft/res/ui/SwipeArea.qml +++ /dev/null @@ -1,52 +0,0 @@ -import QtQuick 2.9 - -MouseArea { - id: mouseSwipeArea - preventStealing: true - - property real prevX: 0 - property real prevY: 0 - property real velocityX: 0.0 - property real velocityY: 0.0 - property int startX: 0 - property int startY: 0 - property bool tracing: false - - signal swipe(string direction) - - onPressed: { - startX = mouse.x - startY = mouse.y - prevX = mouse.x - prevY = mouse.y - velocityX = 0 - velocityY = 0 - tracing = true - } - - onPositionChanged: { - if ( !tracing ) return - var currVelX = (mouse.x-prevX) - var currVelY = (mouse.y-prevY) - - velocityX = (velocityX + currVelX)/2.0; - velocityY = (velocityY + currVelY)/2.0; - - prevX = mouse.x - prevY = mouse.y - - if ( velocityX > 15 && mouse.x > mouseSwipeArea.width * 0.25 ) { - tracing = false - mouseSwipeArea.swipe("right") - } else if ( velocityX < -15 && mouse.x < mouseSwipeArea.width * 0.75 ) { - tracing = false - mouseSwipeArea.swipe("left") - } else if (velocityY > 15 && mouse.y > mouseSwipeArea.height * 0.25 ) { - tracing = false - mouseSwipeArea.swipe("down") - } else if ( velocityY < -15 && mouse.y < mouseSwipeArea.height * 0.75 ) { - tracing = false - mouseSwipeArea.swipe("up") - } - } -} diff --git a/mycroft/res/ui/WebViewHtmlFrame.qml b/mycroft/res/ui/WebViewHtmlFrame.qml deleted file mode 100644 index 25a57d24023d..000000000000 --- a/mycroft/res/ui/WebViewHtmlFrame.qml +++ /dev/null @@ -1,99 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 2.2 -import QtWebEngine 1.8 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.4 as Kirigami - -Item { - id: root - property var pageHtml: webViewHtmlLoader.pageHtml - property var resourceLocation: webViewHtmlLoader.resourceLocation ? webViewHtmlLoader.resourceLocation : "http://localhost" - - onResourceLocationChanged: { - console.log(resourceLocation) - } - - onPageHtmlChanged: { - if(pageHtml){ - webview.loadHtml(pageHtml, resourceLocation) - } - } - - RequestHandler { - id: interactionBar - anchors.top: parent.top - z: 1001 - } - - WebEngineView { - id: webview - anchors.fill: parent - settings.autoLoadImages: true - settings.javascriptEnabled: true - settings.errorPageEnabled: true - settings.pluginsEnabled: true - settings.allowWindowActivationFromJavaScript: true - settings.javascriptCanOpenWindows: true - settings.fullScreenSupportEnabled: true - settings.autoLoadIconsForPage: true - settings.touchIconsEnabled: true - settings.webRTCPublicInterfacesOnly: true - - onNewViewRequested: function(request) { - if (!request.userInitiated) { - console.log("Warning: Blocked a popup window."); - } else if (request.destination === WebEngineView.NewViewInDialog) { - popuproot.open() - request.openIn(popupwebview); - } else { - request.openIn(webview); - } - } - - onJavaScriptDialogRequested: function(request) { - request.accepted = true; - } - - onFeaturePermissionRequested: { - interactionBar.setSource("FeatureRequest.qml") - interactionBar.interactionItem.securityOrigin = securityOrigin; - interactionBar.interactionItem.requestedFeature = feature; - interactionBar.isRequested = true; - } - - onFullScreenRequested: { - request.accept() - } - } - - Popup { - id: popuproot - modal: true - focus: true - width: root.width - Kirigami.Units.largeSpacing * 1.25 - height: root.height - Kirigami.Units.largeSpacing * 1.25 - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent - anchors.centerIn: parent - - WebEngineView { - id: popupwebview - anchors.fill: parent - url: "about:blank" - settings.autoLoadImages: true - settings.javascriptEnabled: true - settings.errorPageEnabled: true - settings.pluginsEnabled: true - settings.allowWindowActivationFromJavaScript: true - settings.javascriptCanOpenWindows: true - settings.fullScreenSupportEnabled: true - settings.autoLoadIconsForPage: true - settings.touchIconsEnabled: true - settings.webRTCPublicInterfacesOnly: true - property string urlalias: popupwebview.url - - onNewViewRequested: function(request) { - console.log(request.destination) - } - } - } -} diff --git a/mycroft/res/ui/WebViewUrlFrame.qml b/mycroft/res/ui/WebViewUrlFrame.qml deleted file mode 100644 index db60ae12b330..000000000000 --- a/mycroft/res/ui/WebViewUrlFrame.qml +++ /dev/null @@ -1,94 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 2.2 -import QtWebEngine 1.8 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.4 as Kirigami - -Item { - id: root - property var pageUrl: webViewUrlLoader.pageUrl - - onPageUrlChanged: { - if(typeof pageUrl !== "undefined" || typeof pageUrl !== null){ - webview.url = pageUrl - } - } - - RequestHandler { - id: interactionBar - anchors.top: parent.top - z: 1001 - } - - WebEngineView { - id: webview - anchors.fill: parent - settings.autoLoadImages: true - settings.javascriptEnabled: true - settings.errorPageEnabled: true - settings.pluginsEnabled: true - settings.allowWindowActivationFromJavaScript: true - settings.javascriptCanOpenWindows: true - settings.fullScreenSupportEnabled: true - settings.autoLoadIconsForPage: true - settings.touchIconsEnabled: true - settings.webRTCPublicInterfacesOnly: true - - onNewViewRequested: function(request) { - if (!request.userInitiated) { - console.log("Warning: Blocked a popup window."); - } else if (request.destination === WebEngineView.NewViewInDialog) { - popuproot.open() - request.openIn(popupwebview); - } else { - request.openIn(webview); - } - } - - onJavaScriptDialogRequested: function(request) { - request.accepted = true; - } - - onFeaturePermissionRequested: { - interactionBar.setSource("FeatureRequest.qml") - interactionBar.interactionItem.securityOrigin = securityOrigin; - interactionBar.interactionItem.requestedFeature = feature; - interactionBar.isRequested = true; - } - - onFullScreenRequested: { - request.accept() - } - } - - Popup { - id: popuproot - modal: true - focus: true - width: root.width - Kirigami.Units.largeSpacing * 1.25 - height: root.height - Kirigami.Units.largeSpacing * 1.25 - closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent - anchors.centerIn: parent - - WebEngineView { - id: popupwebview - anchors.fill: parent - url: "about:blank" - settings.autoLoadImages: true - settings.javascriptEnabled: true - settings.errorPageEnabled: true - settings.pluginsEnabled: true - settings.allowWindowActivationFromJavaScript: true - settings.javascriptCanOpenWindows: true - settings.fullScreenSupportEnabled: true - settings.autoLoadIconsForPage: true - settings.touchIconsEnabled: true - settings.webRTCPublicInterfacesOnly: true - property string urlalias: popupwebview.url - - onNewViewRequested: function(request) { - console.log(request.destination) - } - } - } -} diff --git a/mycroft/res/ui/settings/SettingsModel.qml b/mycroft/res/ui/settings/SettingsModel.qml deleted file mode 100644 index 44937c02a843..000000000000 --- a/mycroft/res/ui/settings/SettingsModel.qml +++ /dev/null @@ -1,46 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.5 as Kirigami -import Mycroft 1.0 as Mycroft - -ListModel { - id: settingsListModel - - ListElement { - settingIcon: "images/home.svg" - settingName: QT_TR_NOOP("Homescreen Settings") - settingEvent: "mycroft.device.settings.homescreen" - settingCall: "show homescreen settings" - } - ListElement { - settingIcon: "images/paint.svg" - settingName: QT_TR_NOOP("Customize") - settingEvent: "mycroft.device.settings.customize" - settingCall: "" - } - ListElement { - settingIcon: "images/display.svg" - settingName: QT_TR_NOOP("Display") - settingEvent: "mycroft.device.settings.display" - settingCall: "" - } - ListElement { - settingIcon: "images/ssh.svg" - settingName: QT_TR_NOOP("Enable SSH") - settingEvent: "mycroft.device.settings.ssh" - settingCall: "show ssh settings" - } - ListElement { - settingIcon: "images/settings.png" - settingName: QT_TR_NOOP("Developer Settings") - settingEvent: "mycroft.device.settings.developer" - settingCall: "" - } - ListElement { - settingIcon: "images/info.svg" - settingName: QT_TR_NOOP("About") - settingEvent: "mycroft.device.settings.about.page" - settingCall: "" - } -} diff --git a/mycroft/res/ui/settings/ThemeView.qml b/mycroft/res/ui/settings/ThemeView.qml deleted file mode 100644 index 98b76e6a1c00..000000000000 --- a/mycroft/res/ui/settings/ThemeView.qml +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 - -ItemDelegate { - id: themeViewer - property bool darkMode: false - property var modelDataStyle: darkMode ? "dark" : "light" - property color viewPrimaryColor - property color viewSecondaryColor - property color viewTextColor - property string themeName - property bool clickEnabled: true - - background: Rectangle { - color: darkMode ? themeViewer.viewPrimaryColor : themeViewer.viewTextColor - border.color: themeViewer.viewSecondaryColor - border.width: 3 - radius: 10 - } - - Item { - id: d1itemThemeView - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Mycroft.Units.gridUnit / 2 - height: parent.height * 0.70 - - GridLayout { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - columns: 2 - - Rectangle { - Layout.fillWidth: true - Layout.fillHeight: true - color: darkMode ? themeViewer.viewPrimaryColor : themeViewer.viewTextColor - border.width: 2 - border.color: Qt.darker(Kirigami.Theme.backgroundColor, 1.5) - - Text { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "P" - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 40 - color: darkMode ? themeViewer.viewTextColor : themeViewer.viewPrimaryColor - font.bold: true - } - } - - Rectangle { - Layout.fillWidth: true - Layout.fillHeight: true - color: themeViewer.viewSecondaryColor - border.width: 2 - border.color: Qt.darker(Kirigami.Theme.backgroundColor, 1.5) - - Text { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "S" - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 40 - color: darkMode ? themeViewer.viewTextColor : themeViewer.viewPrimaryColor - font.bold: true - } - } - Rectangle{ - Layout.fillWidth: true - Layout.fillHeight: true - color: darkMode ? themeViewer.viewTextColor : themeViewer.viewPrimaryColor - border.width: 2 - border.color: Qt.darker(Kirigami.Theme.backgroundColor, 1.5) - - Text { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "T" - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 40 - color: darkMode ? themeViewer.viewPrimaryColor : themeViewer.viewTextColor - font.bold: true - } - } - Rectangle{ - Layout.fillWidth: true - Layout.fillHeight: true - radius: 15 - color: themeViewer.viewSecondaryColor - border.width: 2 - border.color: Qt.darker(Kirigami.Theme.backgroundColor, 1.5) - - Rectangle { - color: darkMode ? themeViewer.viewPrimaryColor : themeViewer.viewTextColor - anchors.centerIn: parent - width: parent.width - 4 - height: parent.height / 4 - - Label { - anchors.centerIn: parent - fontSizeMode: Text.HorizontalFit - font.pixelSize: 32 - minimumPixelSize: 4 - font.bold: true - color: darkMode ? themeViewer.viewTextColor : themeViewer.viewPrimaryColor - text: darkMode ? "Style 1" : "Style 2" - } - } - } - } - } - - Kirigami.Separator { - id: cardSeptThemeView - anchors.top: d1itemThemeView.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.leftMargin: 2 - anchors.rightMargin: 2 - height: 16 - color: themeViewer.viewSecondaryColor - } - - Item { - id: d2itemThemeView - anchors.top: cardSeptThemeView.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - clip: true - - Label { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 20 - minimumPixelSize: 5 - fontSizeMode: Text.Fit - maximumLineCount: 1 - text: themeViewer.themeName - color: darkMode ? themeViewer.viewTextColor : themeViewer.viewPrimaryColor - elide: Text.ElideRight - } - } - - onClicked: { - if(clickEnabled){ - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - styleViewPopUp.setTheme(modelDataStyle) - styleViewPopUp.close() - Mycroft.MycroftController.sendRequest("ovos.theme.get", {}) - } - } -} diff --git a/mycroft/res/ui/settings/about_page.qml b/mycroft/res/ui/settings/about_page.qml deleted file mode 100644 index d3fdc5127f18..000000000000 --- a/mycroft/res/ui/settings/about_page.qml +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 - -Item { - id: customizeSettingsView - anchors.fill: parent - property var systemInformation: sessionData.system_info - - function get_translated_string(entry) { - if(entry.indexOf("Kernel Version") != -1) { - return qsTr("Kernel Version") - } - if(entry.indexOf("Version") != -1) { - var e = entry.split(" ") - return e[0] + " " + qsTr("Version") - } - if(entry.indexOf("Local Address") != -1) { - return qsTr("Local Address") - } - else { - return qsTr(entry) - } - } - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: idleSettingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("About") - color: Kirigami.Theme.textColor - } - } - - Item { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - - Rectangle { - id: sysInfoHeaderBox - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Mycroft.Units.gridUnit * 4 - color: Kirigami.Theme.highlightColor - - Kirigami.Heading { - font.pixelSize: 25 - fontSizeMode: Text.Fit - minimumPixelSize: 5 - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - level: 2 - wrapMode: Text.WordWrap - font.bold: true - font.weight: Font.ExtraBold - text: qsTr("System Information") - color: Kirigami.Theme.textColor - } - } - - ListView { - anchors.top: sysInfoHeaderBox.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - anchors.margins: Mycroft.Units.gridUnit / 2 - clip: true - model: systemInformation.display_list - spacing: Mycroft.Units.gridUnit / 2 - delegate: Label { - text: "" + get_translated_string(modelData.display_key) + ": " + modelData.display_value - font.pixelSize: 25 - fontSizeMode: Text.Fit - minimumPixelSize: 5 - color: Kirigami.Theme.textColor - Layout.alignment: Qt.AlignLeft - - Component.onCompleted: { - if(modelData.display_key.indexOf("Local Address") != -1){ - if(!modelData.display_value) { - text = "" + qsTr("Local Address") + ": " + qsTr("No Active Connection") - } - } - } - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - text: qsTr("Device Settings") - color: Kirigami.Theme.textColor - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - triggerGuiEvent("mycroft.device.settings", {}) - } - } - } -} diff --git a/mycroft/res/ui/settings/code/colorUtils.js b/mycroft/res/ui/settings/code/colorUtils.js deleted file mode 100644 index effbaa0e5a31..000000000000 --- a/mycroft/res/ui/settings/code/colorUtils.js +++ /dev/null @@ -1,67 +0,0 @@ -// creates color value from hue, saturation, brightness, alpha -function _hsla(h, s, b, a) { - var lightness = (2 - s)*b - var satHSL = s*b/((lightness <= 1) ? lightness : 2 - lightness) - lightness /= 2 - var c = Qt.hsla(h, satHSL, lightness, a) - colorChanged(c) - return c -} - -// create rgb value -function _rgb(rgb, a) { - var c = Qt.rgba(rgb.r, rgb.g, rgb.b, a) - colorChanged(c) - return c -} - -// creates a full color string from color value and alpha[0..1], e.g. "#FF00FF00" -function _fullColorString(clr, a) { - return "#" + ((Math.ceil(a*255) + 256).toString(16).substr(1, 2) + clr.toString().substr(1, 6)).toUpperCase() -} - -// extracts integer color channel value [0..255] from color value -function _getChannelStr(clr, channelIdx) { - return parseInt(clr.toString().substr(channelIdx*2 + 1, 2), 16) -} - -// set color from outside -function setColor(color) { - // color object - var c = Qt.tint(color, "transparent") - console.debug('set_color is called with:'+c) - // set rgb. Now it's insufficient to update hue related component. - colorPicker.colorValue = c -} - -// As defined in WCAG 2.1 -var relativeLuminance = function (R8bit, G8bit, B8bit) { - var RsRGB = R8bit / 255.0; - var GsRGB = G8bit / 255.0; - var BsRGB = B8bit / 255.0; - - var R = (RsRGB <= 0.03928) ? RsRGB / 12.92 : Math.pow((RsRGB + 0.055) / 1.055, 2.4); - var G = (GsRGB <= 0.03928) ? GsRGB / 12.92 : Math.pow((GsRGB + 0.055) / 1.055, 2.4); - var B = (BsRGB <= 0.03928) ? BsRGB / 12.92 : Math.pow((BsRGB + 0.055) / 1.055, 2.4); - - return 0.2126 * R + 0.7152 * G + 0.0722 * B; -}; - -function blackContrast(r, g, b) { - var L = relativeLuminance(r, g, b); - return (L + 0.05) / 0.05; -}; - -function whiteContrast(r, g, b) { - var L = relativeLuminance(r, g, b); - return 1.05 / (L + 0.05); -}; - -function autoTextColor(r, g, b) { - var prefer = "#ffffff" - var Cb = blackContrast(r * 255, g * 255, b * 255); - var Cw = whiteContrast(r * 255, g * 255, b * 255); - console.log(Cb, Cw) - if(Cb >= 7.0 && Cw >= 7.0) return prefer; - else return (Cb > Cw) ? '#000000' : '#ffffff' -} diff --git a/mycroft/res/ui/settings/configuration_generator_display.qml b/mycroft/res/ui/settings/configuration_generator_display.qml deleted file mode 100644 index 8430118ff05d..000000000000 --- a/mycroft/res/ui/settings/configuration_generator_display.qml +++ /dev/null @@ -1,341 +0,0 @@ -/* - * Copyright 2022 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.9 -import QtQuick.Controls 2.3 -import org.kde.kirigami 2.11 as Kirigami -import QtGraphicalEffects 1.0 -import Mycroft 1.0 as Mycroft - -Item { - id: configurationLoaderView - anchors.fill: parent - property var configurationData: sessionData.groupConfigurationData - property var groupName: sessionData.groupName - property var updateFieldList: [] - - function selectSettingUpdated(modelData, key, value) { - modelData.field_value = value - var index = updateFieldList.findIndex(function(item) { - return item.field_name == modelData.field_name - }) - if (index == -1) { - updateFieldList.push(modelData) - } else { - updateFieldList[index].field_value = value - } - } - - function generate_settings_ui(mData, comp) { - console.log(mData.field_type, comp) - - if (mData.field_type == "bool") { - var newObject = Qt.createComponent("configuration_ui/settingCheckBox.qml") - var fieldDisplay = newObject.createObject(comp, {checked: mData.field_value.toString() == "true" ? 1 : 0, text: mData.field_value == "true" ? "Disable" : "Enable", "key": mData.field_name, "value": mData.field_value, "modelData": mData}); - fieldDisplay.fieldUpdated.connect(selectSettingUpdated) - } - if (mData.field_type == "str" || mData.field_type == "int" || mData.field_type == "float") { - var newObject = Qt.createComponent("configuration_ui/settingTextBox.qml") - var fieldDisplay = newObject.createObject(comp, {text: mData.field_value, "key": mData.field_name, "value": mData.field_value, "modelData": mData}); - fieldDisplay.fieldUpdated.connect(selectSettingUpdated) - } - if (mData.field_type == "list") { - var listObject = [] - for (var lst=0; lst < mData.field_value.length; lst++){ - listObject.push(mData.field_value[lst]) - } - console.log(listObject) - var newObject = Qt.createComponent("configuration_ui/settingListBox.qml") - var fieldDisplay = newObject.createObject(comp, {"value": mData.field_value, "key": mData.field_name, "modelData": mData}); - fieldDisplay.fieldUpdated.connect(selectSettingUpdated) - } - } - - function sanitize_values(mValues) { - var val_listing = [] - for (var i = 0; i < mValues.length; i++) { - if (mValues[i].includes('|')) { - var splitVals = mValues[i].split("|")[1] - val_listing.push(splitVals.toLowerCase()) - } else { - val_listing.push(mValues[i]) - } - } - return val_listing - } - - onConfigurationDataChanged: { - configDataView.update() - if(configurationData !== null){ - configDataView.model = configurationData.group_sections - configPageHeading.text = groupName.toUpperCase() + " " + qsTr("Configuration") - } - } - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: configPageHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.capitalization: Font.Capitalize - font.bold: true - color: Kirigami.Theme.linkColor - } - } - - Flickable { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - anchors.bottomMargin: Kirigami.Units.smallSpacing - contentHeight: scvGrid.implicitHeight - clip: true - - GridLayout { - id: scvGrid - width: parent.width - columns: scvGrid.width > 850 ? 2 : 1 - rowSpacing: Kirigami.Units.smallSpacing - - Repeater { - id: configDataView - clip: true - - delegate: Control { - id: delegateRoot - Layout.alignment: Qt.AlignTop - Layout.fillWidth: true - - background: Rectangle { - color: Qt.darker(Kirigami.Theme.backgroundColor, 2) - radius: 10 - } - - contentItem: Item { - implicitWidth: scvGrid.width > 850 ? scvGrid.width / 2 : scvGrid.width - implicitHeight: delegateLayout.implicitHeight + Kirigami.Units.largeSpacing - - ColumnLayout { - id: delegateLayout - anchors.left: parent.left - anchors.right: parent.right - spacing: Kirigami.Units.largeSpacing - - Rectangle { - id: skillNameBlock - color: Kirigami.Theme.linkColor - Layout.fillWidth: true - Layout.margins: Kirigami.Units.largeSpacing - Layout.preferredHeight: skillName.contentHeight + Kirigami.Units.smallSpacing - radius: 3 - - Kirigami.Heading { - id: skillName - elide: Text.ElideRight - font.weight: Font.DemiBold - text: modelData.section_label - width: parent.width - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - level: 2 - } - } - - Repeater { - id: sectionFieldsDisplay - model: modelData.section_fields - - delegate: GridLayout { - id: configGridBox - Layout.fillWidth: true - Layout.margins: Kirigami.Units.largeSpacing / 2 - Layout.alignment: Qt.AlignLeft | Qt.AlignTop - - columns: switch(modelData.field_type) { - case "str": - if(modelData.field_description.length > 2){ - return 1; - } else { - return 2; - } - case "bool": - if(modelData.field_description.length > 2){ - return 1; - } else { - return 2; - } - case "list": return 1; - default: return 2; - } - - Kirigami.Heading { - id: configTopFieldLabel - Layout.alignment: Qt.AlignLeft - elide: Text.ElideRight - text: modelData.field_label - Layout.fillWidth: true - wrapMode: Text.WordWrap; - font.capitalization: Font.Capitalize - textFormat: Text.AutoText - level: 3 - } - - Label { - id: configTopFieldDescription - Layout.alignment: Qt.AlignLeft - Layout.fillWidth: true - wrapMode: Text.WordWrap; - elide: Text.ElideRight - text: modelData.field_description - visible: modelData.field_description.length > 2 ? 1 : 0 - enabled: modelData.field_description.length > 2 ? 1 : 0 - font.pixelSize: configTopFieldLabel.font.pixelSize * 0.75 - } - - ButtonGroup { - id: settingGroup - } - - Component.onCompleted: { - generate_settings_ui(modelData, configGridBox) - configDataView.update() - } - } - } - } - } - } - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - Item { - anchors.top: areaSep.bottom - anchors.bottom: parent.bottom - width: parent.width / 2 - anchors.left: parent.left - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: qsTr("Back") - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("ovos.phal.configuration.provider.list.groups", {}) - } - } - } - - Item { - anchors.top: areaSep.bottom - anchors.bottom: parent.bottom - width: parent.width / 2 - anchors.right: parent.right - - RowLayout { - anchors.fill: parent - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: qsTr("Update Settings") - horizontalAlignment: Text.AlignRight - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - - Kirigami.Icon { - id: nextIcon - source: "run-build-configure" - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - Layout.alignment: Qt.AlignRight - - ColorOverlay { - anchors.fill: parent - source: nextIcon - color: Kirigami.Theme.textColor - } - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("ovos.phal.configuration.provider.set", {"configuration": configurationLoaderView.updateFieldList, "group_name": configurationLoaderView.groupName}) - Mycroft.MycroftController.sendRequest("ovos.phal.configuration.provider.list.groups", {}) - } - } - } - } -} diff --git a/mycroft/res/ui/settings/configuration_groups_display.qml b/mycroft/res/ui/settings/configuration_groups_display.qml deleted file mode 100644 index 42aee5287400..000000000000 --- a/mycroft/res/ui/settings/configuration_groups_display.qml +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright 2022 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.kirigami 2.5 as Kirigami -import Mycroft 1.0 as Mycroft -import QtGraphicalEffects 1.12 - -Item { - id: advancedConfigurationGroupsView - anchors.fill: parent - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: advancedConfigurationGroupsViewHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("Advanced Configuration") - color: Kirigami.Theme.textColor - } - } - - ColumnLayout { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - anchors.bottomMargin: Kirigami.Units.largeSpacing - - Kirigami.Heading { - id: warnText - level: 3 - Layout.fillWidth: true - wrapMode: Text.WordWrap - color: Kirigami.Theme.textColor - text: " All configuration changes made here can alter the functionality of your device, some changes might also require a reboot to take affect " - } - - Item { - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.largeSpacing - } - - ListView { - Layout.fillWidth: true - Layout.fillHeight: true - clip: true - model: sessionData.groupList - boundsBehavior: Flickable.StopAtBounds - - delegate: Kirigami.AbstractListItem { - activeBackgroundColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.7) - contentItem: Item { - implicitWidth: delegateLayout.implicitWidth; - implicitHeight: delegateLayout.implicitHeight; - - RowLayout { - id: delegateLayout - spacing: Mycroft.Units.gridUnit / 2 - - anchors { - left: parent.left; - top: parent.top; - right: parent.right; - } - - Kirigami.Icon { - id: iconGroupHolder - source: "beamerblock" - Layout.preferredWidth: Mycroft.Units.gridUnit * 2 - Layout.preferredHeight: Mycroft.Units.gridUnit * 2 - - ColorOverlay { - anchors.fill: parent - source: iconGroupHolder - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.7) - } - } - - Kirigami.Heading { - id: connectionNameLabel - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - verticalAlignment: Text.AlignVCenter - height: paintedHeight - elide: Text.ElideRight - font.weight: Font.DemiBold - font.capitalization: Font.Capitalize - text: modelData.replace("_", " ") - textFormat: Text.PlainText - color: Kirigami.Theme.textColor - level: 2 - } - } - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("ovos.phal.configuration.provider.get", {"group": modelData}) - } - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - text: qsTr("Back") - color: Kirigami.Theme.textColor - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.settings.developer", {}) - } - } - } -} diff --git a/mycroft/res/ui/settings/configuration_ui/settingCheckBox.qml b/mycroft/res/ui/settings/configuration_ui/settingCheckBox.qml deleted file mode 100644 index cc6966622310..000000000000 --- a/mycroft/res/ui/settings/configuration_ui/settingCheckBox.qml +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2022 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick 2.9 -import QtQuick.Controls 2.3 -import QtQuick.Layouts 1.4 - -CheckBox { - property string buttonId; - property var modelData; - property var key; - property var value; - signal fieldUpdated(var modelData, string key, string value); - - onCheckedChanged: { - if(checked){ - fieldUpdated(modelData, key, "true") - } else { - fieldUpdated(modelData, key, "false") - } - } -} diff --git a/mycroft/res/ui/settings/configuration_ui/settingListBox.qml b/mycroft/res/ui/settings/configuration_ui/settingListBox.qml deleted file mode 100644 index d971ff7937e3..000000000000 --- a/mycroft/res/ui/settings/configuration_ui/settingListBox.qml +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2022 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.9 -import QtQuick.Controls 2.3 -import org.kde.kirigami 2.11 as Kirigami -import Mycroft 1.0 as Mycroft - -ColumnLayout { - id: listGeneratedItem - property var modelData - property var key - property var value - Layout.fillWidth: true - property bool editMode: false - signal fieldUpdated(var modelData, string key, string value); - - onValueChanged: { - fieldUpdated(modelData, key, value) - } - - function add_item_to_value(item) { - listGeneratedItem.value.push(item) - simpleListView.visible = false - simpleListView.model = [0, 0, 0] - simpleListView.enabled = false - simpleListView.enabled = true - simpleListView.visible = true - simpleListView.model = listGeneratedItem.value - } - - function remove_item_from_value(itemIndex) { - listGeneratedItem.value.pop(itemIndex) - simpleListView.visible = false - simpleListView.model = [0, 0, 0] - simpleListView.enabled = false - simpleListView.enabled = true - simpleListView.visible = true - simpleListView.model = listGeneratedItem.value - } - - Repeater { - id: simpleListView - model: listGeneratedItem.value - - delegate: Kirigami.AbstractListItem { - width: simpleListView.width - height: Mycroft.Units.gridUnit * 4 - - background: Rectangle { - color: Kirigami.Theme.backgroundColor - radius: 6 - } - - contentItem: RowLayout { - Label { - Layout.fillWidth: true - Layout.fillHeight: true - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: modelData - } - - Button { - Layout.preferredWidth: Mycroft.Units.gridUnit * 6 - Layout.fillHeight: true - visible: listGeneratedItem.editMode ? 1 : 0 - enabled: listGeneratedItem.editMode ? 1 : 0 - - background: Rectangle { - color: Kirigami.Theme.highlightColor - radius: 6 - } - - contentItem: Item { - Kirigami.Icon { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - source: "edit-delete-remove" - color: Kirigami.Theme.textColor - } - } - - onClicked: { - listGeneratedItem.remove_item_from_value(index) - } - } - } - } - } - - RowLayout { - Layout.fillWidth: true - Layout.preferredHeight: Mycroft.Units.gridUnit * 4 - - Button { - Layout.fillWidth: true - Layout.preferredHeight: Mycroft.Units.gridUnit * 3.5 - Layout.alignment: Qt.AlignVCenter - - background: Rectangle { - color: Kirigami.Theme.highlightColor - radius: 6 - } - - contentItem: Item { - Kirigami.Icon { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - source: "list-add-symbolic" - color: Kirigami.Theme.textColor - } - } - - onClicked: { - addListItemBox.privateItem = listGeneratedItem - addListItemBox.open() - } - } - - Button { - Layout.fillWidth: true - Layout.preferredHeight: Mycroft.Units.gridUnit * 3.5 - Layout.alignment: Qt.AlignVCenter - enabled: simpleListView.count > 0 ? 1 : 0 - visible: simpleListView.count > 0 ? 1 : 0 - - background: Rectangle { - color: Kirigami.Theme.highlightColor - radius: 6 - } - - contentItem: Item { - Kirigami.Icon { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - source: "document-edit" - color: Kirigami.Theme.textColor - } - } - - onClicked: { - if(!listGeneratedItem.editMode) { - listGeneratedItem.editMode = true - } else { - listGeneratedItem.editMode = false - } - } - } - } - - Popup { - id: addListItemBox - width: parent.width * 0.80 - height: Mycroft.Units.gridUnit * 8 - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - parent: configurationLoaderView - property var privateItem - - ColumnLayout { - anchors.fill: parent - - TextField { - id: addListItemTextBox - Layout.fillWidth: true - Layout.preferredHeight: Mycroft.Units.gridUnit * 4 - placeholderText: qsTr("Type here to add an item to the list") - } - - Button { - Layout.fillWidth: true - Layout.preferredHeight: Mycroft.Units.gridUnit * 2 - - background: Rectangle { - color: Kirigami.Theme.highlightColor - radius: 6 - } - - contentItem: Label { - text: qsTr("Add Item") - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } - - onClicked: { - addListItemBox.privateItem.add_item_to_value(addListItemTextBox.text) - addListItemBox.close() - } - } - } - } -} diff --git a/mycroft/res/ui/settings/configuration_ui/settingTextBox.qml b/mycroft/res/ui/settings/configuration_ui/settingTextBox.qml deleted file mode 100644 index 3000a240127a..000000000000 --- a/mycroft/res/ui/settings/configuration_ui/settingTextBox.qml +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2022 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick 2.9 -import QtQuick.Controls 2.3 -import QtQuick.Layouts 1.4 -import org.kde.kirigami 2.11 as Kirigami - -TextField { - property string buttonId; - property var modelData; - property var key; - property var value; - signal fieldUpdated(var modelData, string key, string value); - Layout.fillWidth: true - Layout.minimumHeight: Kirigami.Units.gridUnit * 2 - - onTextChanged: { - fieldUpdated(modelData, key, text) - } -} diff --git a/mycroft/res/ui/settings/customize_settings.qml b/mycroft/res/ui/settings/customize_settings.qml deleted file mode 100644 index 2b6fcce32e04..000000000000 --- a/mycroft/res/ui/settings/customize_settings.qml +++ /dev/null @@ -1,492 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 - -Item { - id: customizeSettingsView - anchors.fill: parent - property var colorSchemeModel - property var setColorScheme - - Component.onCompleted: { - OVOSPlugin.Configuration.updateSchemeList(); - colorSchemeModel = OVOSPlugin.Configuration.getSchemeList(); - colorSchemesView.model = colorSchemeModel.schemes; - setColorScheme = OVOSPlugin.Configuration.getSelectedSchemeName(); - console.log(setColorScheme); - } - - Connections { - target: OVOSPlugin.Configuration - onSchemeChanged: { - setColorScheme = OVOSPlugin.Configuration.getSelectedSchemeName(); - } - } - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: customizeSettingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("Customize Settings") - color: Kirigami.Theme.textColor - } - } - - Item { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - - GridView { - id: colorSchemesView - width: parent.width - height: parent.height - cellWidth: parent.width / 3 - cellHeight: parent.height / 2 - clip: true - - delegate: ItemDelegate { - id: parentRectDelta - implicitHeight: colorSchemesView.cellHeight - (Mycroft.Units.largeSpacing * 2) - implicitWidth: colorSchemesView.cellWidth - (Mycroft.Units.largeSpacing * 2) - - background: Rectangle { - color: modelData.primaryColor - radius: 10 - } - - Item { - id: d1item - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Mycroft.Units.gridUnit / 2 - height: parent.height * 0.70 - - GridLayout { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - columns: 2 - - Rectangle { - Layout.fillWidth: true - Layout.fillHeight: true - color: modelData.primaryColor - border.width: 2 - border.color: Qt.darker(Kirigami.Theme.backgroundColor, 1.5) - - Text { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "P" - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 40 - color: Qt.darker(Kirigami.Theme.textColor, 1.5) - font.bold: true - } - } - - Rectangle { - Layout.fillWidth: true - Layout.fillHeight: true - color: modelData.secondaryColor - border.width: 2 - border.color: Qt.darker(Kirigami.Theme.backgroundColor, 1.5) - - Text { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "S" - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 40 - color: Qt.darker(Kirigami.Theme.textColor, 1.5) - font.bold: true - } - } - Rectangle{ - Layout.fillWidth: true - Layout.fillHeight: true - color: modelData.textColor - border.width: 2 - border.color: Qt.darker(Kirigami.Theme.backgroundColor, 1.5) - - Text { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: "T" - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 40 - color: Qt.darker(Kirigami.Theme.textColor, 1.5) - font.bold: true - } - } - Rectangle{ - Layout.fillWidth: true - Layout.fillHeight: true - visible: modelData.name == setColorScheme ? 1 : 0 - enabled: modelData.name == setColorScheme ? 1 : 0 - color: "transparent" - - Kirigami.Icon { - anchors.fill: parent - anchors.margins: 4 - source: Qt.resolvedUrl("images/tick.svg") - color: Kirigami.Theme.textColor - } - } - } - } - - Kirigami.Separator { - id: cardSept - anchors.top: d1item.bottom - anchors.left: parent.left - anchors.right: parent.right - height: 16 - color: modelData.secondaryColor - } - - Item { - id: d2item - anchors.top: cardSept.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - clip: true - - Label { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 20 - minimumPixelSize: 5 - fontSizeMode: Text.Fit - maximumLineCount: 1 - text: modelData.name - color: modelData.textColor - elide: Text.ElideRight - } - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - styleViewPopUp.showView(modelData.name, modelData.path, modelData.primaryColor, modelData.secondaryColor, modelData.textColor) - } - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - Item { - anchors.top: areaSep.bottom - anchors.bottom: parent.bottom - width: parent.width / 2 - anchors.left: parent.left - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: qsTr("Device Settings") - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.settings", {}) - } - } - } - - Item { - anchors.top: areaSep.bottom - anchors.bottom: parent.bottom - width: parent.width / 2 - anchors.right: parent.right - - RowLayout { - anchors.fill: parent - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: qsTr("Create Scheme") - horizontalAlignment: Text.AlignRight - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - - Kirigami.Icon { - id: nextIcon - source: Qt.resolvedUrl("images/next.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - Layout.alignment: Qt.AlignRight - - ColorOverlay { - anchors.fill: parent - source: nextIcon - color: Kirigami.Theme.textColor - } - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.settings.create.theme", {}) - } - } - } - } - - ItemDelegate { - id: styleViewPopUp - width: parent.width * 0.9 - height: parent.height * 0.9 - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - property var modelDataPath - property var modelDataName - property color primaryColor - property color secondaryColor - property color textColor - property bool opened: false - visible: opened - enabled: opened - - function open(){ - styleViewPopUp.opened = true - } - - function close(){ - styleViewPopUp.opened = false - } - - function showView(modelDataName, modelDataPath, primaryColor, secondaryColor, textColor) { - styleViewPopUp.primaryColor = primaryColor - styleViewPopUp.secondaryColor = secondaryColor - styleViewPopUp.textColor = textColor - styleViewPopUp.modelDataName = modelDataName - styleViewPopUp.modelDataPath = modelDataPath - styleViewPopUp.open() - } - - function setTheme(themeStyle) { - OVOSPlugin.Configuration.setScheme(styleViewPopUp.modelDataName, styleViewPopUp.modelDataPath, themeStyle) - styleViewPopUp.close() - } - - background: Rectangle { - color: Kirigami.Theme.backgroundColor - layer.enabled: true - layer.effect: DropShadow { - color: Kirigami.Theme.backgroundColor - transparentBorder: false - horizontalOffset: 0 - verticalOffset: 0 - spread: 0.2 - radius: 8 - samples: 16 - } - - Rectangle { - anchors.fill: parent - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - } - } - - contentItem: Item { - - Rectangle { - id: popupHeaderArea - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.6) - anchors.left: parent.left - anchors.right: parent.right - height: Mycroft.Units.gridUnit * 5 - radius: 4 - - Label { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Mycroft.Units.gridUnit / 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 32 - font.bold: true - minimumPixelSize: 5 - fontSizeMode: Text.Fit - maximumLineCount: 1 - text: qsTr("Select Style") - color: Kirigami.Theme.textColor - elide: Text.ElideRight - } - } - - RowLayout { - anchors.top: popupHeaderArea.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: popupBottomArea.top - anchors.margins: Mycroft.Units.gridUnit / 2 - - ThemeView { - Layout.fillWidth: true - Layout.fillHeight: true - darkMode: true - viewPrimaryColor: styleViewPopUp.primaryColor - viewSecondaryColor: styleViewPopUp.secondaryColor - viewTextColor: styleViewPopUp.textColor - themeName: styleViewPopUp.modelDataName - } - - ThemeView { - Layout.fillWidth: true - Layout.fillHeight: true - darkMode: false - viewPrimaryColor: styleViewPopUp.primaryColor - viewSecondaryColor: styleViewPopUp.secondaryColor - viewTextColor: styleViewPopUp.textColor - themeName: styleViewPopUp.modelDataName - } - } - - Rectangle { - id: popupBottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 5 - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - border.color: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5) - border.width: 1 - radius: 4 - - RowLayout { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: Mycroft.Units.gridUnit / 2 - - Kirigami.Icon { - id: backIconPopUp - source: "window-close-symbolic" - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIconPopUp - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: qsTr("Cancel") - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - styleViewPopUp.close() - } - } - } - } - } -} - diff --git a/mycroft/res/ui/settings/customize_theme.qml b/mycroft/res/ui/settings/customize_theme.qml deleted file mode 100644 index 052b939014f9..000000000000 --- a/mycroft/res/ui/settings/customize_theme.qml +++ /dev/null @@ -1,629 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 -import "code/colorUtils.js" as ColorUtils -import "delegates" as Delegates - -Item { - id: createThemeView - anchors.fill: parent - property color selectedPrimaryColor: Kirigami.Theme.backgroundColor - property color selectedSecondaryColor: Kirigami.Theme.highlightColor - property color selectedTextColor: Kirigami.Theme.textColor - property string selectedThemeName: qsTr("Example Scheme") - - onSelectedPrimaryColorChanged: { - selectedTextColor = ColorUtils.autoTextColor(selectedPrimaryColor.r, selectedPrimaryColor.g, selectedPrimaryColor.b) - } - - Connections { - target: Mycroft.MycroftController - - onIntentRecevied: { - if (type == "ovos.shell.gui.color.scheme.generated") { - timeoutMessageTimer.stop() - visualBusyIndicatorBox.visible = false - visualBusyIndicatorBox.enabled = false - // Go back to customize screen if there is a response - triggerGuiEvent("mycroft.device.settings.customize", {}) - } - } - } - - // Wait sometime before closing the busy BusyIndicator - // If there is no response from the phal plugin - Timer { - id: timeoutMessageTimer - running: false - interval: 12000 - repeat: false - onTriggered: { - if(visualBusyIndicatorBox.visible) { - visualBusyIndicatorBox.visible = false - visualBusyIndicatorBox.enabled = false - } - } - } - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: customizeSettingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("Create Scheme") - color: Kirigami.Theme.textColor - } - } - - Item { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - - Item { - id: themeSetterArea - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: themePreviewArea.top - - GridLayout { - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: themeSetterAreaBottomLine.top - anchors.margins: Mycroft.Units.gridUnit / 2 - columns: 2 - rows: 2 - - Rectangle { - id: primaryColorSelectButton - Layout.fillWidth: true - Layout.fillHeight: true - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.5) - border.color: Kirigami.Theme.highlightColor - border.width: 1 - - Rectangle { - id: buttonPrimaryColorPreviewBox - anchors.left: parent.left - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: Mycroft.Units.gridUnit / 2 - color: createThemeView.selectedPrimaryColor - width: height - } - - Label { - anchors.left: buttonPrimaryColorPreviewBox.right - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 24 - font.bold: true - elide: Text.ElideRight - wrapMode: Text.WordWrap - text: qsTr("Select Primary Color") - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - primaryColorSelectorPopup.open() - } - } - } - Rectangle { - id: secondaryColorSelectButton - Layout.fillWidth: true - Layout.fillHeight: true - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.5) - border.color: Kirigami.Theme.highlightColor - border.width: 1 - - Rectangle { - id: buttonSecondaryColorPreviewBox - anchors.left: parent.left - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: Mycroft.Units.gridUnit / 2 - color: createThemeView.selectedSecondaryColor - width: height - } - - Label { - anchors.left: buttonSecondaryColorPreviewBox.right - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 24 - font.bold: true - elide: Text.ElideRight - wrapMode: Text.WordWrap - text: qsTr("Select Secondary Color") - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - secondaryColorSelectorPopup.open() - } - } - } - Rectangle { - id: autoTextColorButton - Layout.fillWidth: true - Layout.fillHeight: true - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.5) - border.color: Kirigami.Theme.highlightColor - border.width: 1 - - Rectangle { - id: buttonTextColorPreviewBox - anchors.left: parent.left - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: Mycroft.Units.gridUnit / 2 - color: createThemeView.selectedTextColor - width: height - } - - Label { - anchors.left: buttonTextColorPreviewBox.right - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 24 - font.bold: true - elide: Text.ElideRight - wrapMode: Text.WordWrap - text: qsTr("Auto Text Color") - } - } - Rectangle { - id: setNameButton - Layout.fillWidth: true - Layout.fillHeight: true - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.5) - border.color: Kirigami.Theme.highlightColor - border.width: 1 - - Kirigami.Icon { - id: buttonIconNameBox - anchors.left: parent.left - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.margins: Mycroft.Units.gridUnit / 2 - width: height - source: "edit-select-text" - } - - Label { - anchors.left: buttonIconNameBox.right - anchors.right: parent.right - anchors.top: parent.top - anchors.bottom: parent.bottom - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - fontSizeMode: Text.Fit - minimumPixelSize: 5 - font.pixelSize: 24 - font.bold: true - elide: Text.ElideRight - wrapMode: Text.WordWrap - text: qsTr("Set Name") - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - setNameBoxPopup.open() - } - } - } - } - - Kirigami.Separator { - id: themeSetterAreaBottomLine - anchors.bottom: parent.bottom - width: parent.width - height: 1 - color: Kirigami.Theme.highlightColor - } - } - - Item { - id: themePreviewArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: themeButtonArea.top - height: Mycroft.Units.gridUnit * 5 - - Rectangle { - id: previewButtonArea - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - border.color: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5) - border.width: 1 - radius: 4 - - RowLayout { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: Mycroft.Units.gridUnit / 2 - - Kirigami.Icon { - id: previewButtonIcon - source: "actor" - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: previewButtonIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: qsTr("Preview") - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - previewPopUpBox.open() - } - } - } - } - Item { - id: themeButtonArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 5 - - Rectangle { - id: createButtonArea - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - border.color: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5) - border.width: 1 - radius: 4 - - RowLayout { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: Mycroft.Units.gridUnit / 2 - - Kirigami.Icon { - id: createButtonIcon - source: "checkmark" - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: createButtonIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: qsTr("Create") - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("ovos.shell.gui.color.scheme.generate", {"theme_name": createThemeView.selectedThemeName, "primaryColor": createThemeView.selectedPrimaryColor, "secondaryColor": createThemeView.selectedSecondaryColor, "textColor": createThemeView.selectedTextColor}) - visualBusyIndicatorBox.visible = true - visualBusyIndicatorBox.enabled = true - timeoutMessageTimer.start() - } - } - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.top: areaSep.bottom - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: qsTr("Back") - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.settings.customize", {}) - } - } - } - - ItemDelegate { - id: previewPopUpBox - width: parent.width * 0.9 - height: parent.height * 0.9 - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - property bool opened: false - visible: previewPopUpBox.opened - enabled: previewPopUpBox.opened - - function open() { - previewPopUpBox.opened = true - } - - function close() { - previewPopUpBox.opened = false - } - - background: Rectangle { - color: Kirigami.Theme.backgroundColor - layer.enabled: true - layer.effect: DropShadow { - color: Kirigami.Theme.backgroundColor - transparentBorder: false - horizontalOffset: 0 - verticalOffset: 0 - spread: 0.2 - radius: 8 - samples: 16 - } - - Rectangle { - anchors.fill: parent - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - } - } - - contentItem: Item { - - Rectangle { - id: popupHeaderArea - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.6) - anchors.left: parent.left - anchors.right: parent.right - height: Mycroft.Units.gridUnit * 5 - radius: 4 - - Label { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Mycroft.Units.gridUnit / 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 32 - font.bold: true - minimumPixelSize: 5 - fontSizeMode: Text.Fit - maximumLineCount: 1 - text: qsTr("Preview") - color: Kirigami.Theme.textColor - elide: Text.ElideRight - } - } - - RowLayout { - anchors.top: popupHeaderArea.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: popupBottomArea.top - anchors.margins: Mycroft.Units.gridUnit / 2 - - ThemeView { - Layout.fillWidth: true - Layout.fillHeight: true - darkMode: true - viewPrimaryColor: createThemeView.selectedPrimaryColor - viewSecondaryColor: createThemeView.selectedSecondaryColor - viewTextColor: createThemeView.selectedTextColor - themeName: createThemeView.selectedThemeName - clickEnabled: false - } - - ThemeView { - Layout.fillWidth: true - Layout.fillHeight: true - darkMode: false - viewPrimaryColor: createThemeView.selectedPrimaryColor - viewSecondaryColor: createThemeView.selectedSecondaryColor - viewTextColor: createThemeView.selectedTextColor - themeName: createThemeView.selectedThemeName - clickEnabled: false - } - } - - Rectangle { - id: popupBottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 5 - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - border.color: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5) - border.width: 1 - radius: 4 - - RowLayout { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: Mycroft.Units.gridUnit / 2 - - Kirigami.Icon { - id: backIconPopUp - source: "window-close-symbolic" - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIconPopUp - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: qsTr("Cancel") - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - previewPopUpBox.close() - } - } - } - } - } - - Delegates.ColorSelectPrimary { - id: primaryColorSelectorPopup - } - - Delegates.ColorSelectSecondary { - id: secondaryColorSelectorPopup - } - - Delegates.SetNameBox { - id: setNameBoxPopup - } - - Rectangle { - id: visualBusyIndicatorBox - visible: false - enabled: false - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.5) - anchors.fill: parent - - Mycroft.BusyIndicator { - anchors.centerIn: parent - running: visualBusyIndicatorBox.visible ? 1 : 0 - } - } -} - diff --git a/mycroft/res/ui/settings/delegates/BrightnessSlider.qml b/mycroft/res/ui/settings/delegates/BrightnessSlider.qml deleted file mode 100644 index 79f6668a2cdf..000000000000 --- a/mycroft/res/ui/settings/delegates/BrightnessSlider.qml +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami - -Slider { - id: control - from: 0.75 - to: 1.15 - live: true - stepSize: 0.1 - orientation: Qt.Vertical - value: 1 - - background: Rectangle { - x: control.leftPadding + control.availableWidth / 2 - width / 2 - y: control.topPadding - implicitWidth: 40 - implicitHeight: 200 - width: implicitWidth - height: control.availableHeight - radius: 2 - color: Kirigami.Theme.textColor - - Rectangle { - width: parent.width - height: control.visualPosition * parent.height - color: Qt.darker(Kirigami.Theme.textColor, 2.5) - radius: 2 - } - } - - handle: Rectangle { - y: control.topPadding + control.visualPosition * (control.availableHeight - height) - x: control.leftPadding + control.availableWidth / 2 - width / 2 - width: parent.width - height: 8 - color: control.pressed ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - border.color: Kirigami.Theme.highlightColor - } -} diff --git a/mycroft/res/ui/settings/delegates/ColorSelectPrimary.qml b/mycroft/res/ui/settings/delegates/ColorSelectPrimary.qml deleted file mode 100644 index 00f65547940c..000000000000 --- a/mycroft/res/ui/settings/delegates/ColorSelectPrimary.qml +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 - -Popup { - id: colorSelectPrimaryBox - width: parent.width * 0.9 - height: parent.height * 0.9 - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - dim: true - - Overlay.modeless: Rectangle { - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - } - - background: Rectangle { - color: Kirigami.Theme.backgroundColor - layer.enabled: true - layer.effect: DropShadow { - color: Kirigami.Theme.backgroundColor - transparentBorder: false - horizontalOffset: 0 - verticalOffset: 0 - spread: 0.2 - radius: 8 - samples: 16 - } - - Rectangle { - anchors.fill: parent - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - } - } - - contentItem: Item { - - Rectangle { - id: popupHeaderArea - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.6) - anchors.left: parent.left - anchors.right: parent.right - height: Mycroft.Units.gridUnit * 5 - radius: 4 - - Label { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Mycroft.Units.gridUnit / 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 32 - font.bold: true - minimumPixelSize: 5 - fontSizeMode: Text.Fit - maximumLineCount: 1 - text: "Select Primary Color" - color: Kirigami.Theme.textColor - elide: Text.ElideRight - } - } - - Item { - anchors.top: popupHeaderArea.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: popupBottomArea.top - anchors.margins: Mycroft.Units.gridUnit / 2 - - PalettesGrid { - anchors.fill: parent - } - } - - Rectangle { - id: popupBottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 5 - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - border.color: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5) - border.width: 1 - radius: 4 - - RowLayout { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: Mycroft.Units.gridUnit / 2 - - Kirigami.Icon { - id: backIconPopUp - source: "window-close-symbolic" - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIconPopUp - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: "Close" - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../../snd/clicked.wav")) - colorSelectPrimaryBox.close() - } - } - } - } -} - diff --git a/mycroft/res/ui/settings/delegates/ColorSelectSecondary.qml b/mycroft/res/ui/settings/delegates/ColorSelectSecondary.qml deleted file mode 100644 index 1f77b746949e..000000000000 --- a/mycroft/res/ui/settings/delegates/ColorSelectSecondary.qml +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 -import "../code/colorUtils.js" as ColorUtils - -Popup { - id: colorSelectSecondaryBox - width: parent.width * 0.9 - height: parent.height * 0.9 - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - dim: true - property color colorValue: Kirigami.Theme.highlightColor - property bool darkHue: false - property color _changingColorValue : ColorUtils._hsla(hueSlider.value, 1, 1, 1) - property color _tempColorValue: "transparent" - property var brightnessSliderValue: brightnessSlider.value - - onColorValueChanged: { - createThemeView.selectedSecondaryColor = colorValue - } - - on_ChangingColorValueChanged: { - _tempColorValue = _changingColorValue - } - - onBrightnessSliderValueChanged: { - if(brightnessSliderValue >= 1) { - darkHue: true - } else { - darkHue: false - } - } - - Overlay.modeless: Rectangle { - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - } - - background: Rectangle { - color: Kirigami.Theme.backgroundColor - layer.enabled: true - layer.effect: DropShadow { - color: Kirigami.Theme.backgroundColor - transparentBorder: false - horizontalOffset: 0 - verticalOffset: 0 - spread: 0.2 - radius: 8 - samples: 16 - } - - Rectangle { - anchors.fill: parent - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - } - } - - contentItem: Item { - - Rectangle { - id: popupHeaderArea - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.6) - anchors.left: parent.left - anchors.right: parent.right - height: Mycroft.Units.gridUnit * 5 - radius: 4 - - Label { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Mycroft.Units.gridUnit / 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 32 - font.bold: true - minimumPixelSize: 5 - fontSizeMode: Text.Fit - maximumLineCount: 1 - text: "Select Secondary Color" - color: Kirigami.Theme.textColor - elide: Text.ElideRight - } - } - - Item { - anchors.top: popupHeaderArea.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: popupBottomArea.top - anchors.margins: Mycroft.Units.gridUnit / 2 - - RowLayout { - anchors.fill: parent - anchors.margins: 10 - - Rectangle { - Layout.preferredWidth: parent.width / 2 - Layout.fillHeight: true - color: darkHue ? Qt.lighter(_tempColorValue, brightnessSliderValue) : Qt.darker(_tempColorValue, brightnessSliderValue) - - onColorChanged: { - colorValue = color - } - } - - Item { - id: huePicker - Layout.preferredWidth: Mycroft.Units.gridUnit * 2 - Layout.fillHeight: true - Layout.topMargin: 8 - Layout.bottomMargin: 8 - - Rectangle { - anchors.fill: parent - id: colorBar - gradient: Gradient { - GradientStop { position: 1.0; color: "#FF0000" } - GradientStop { position: 0.85; color: "#FFFF00" } - GradientStop { position: 0.76; color: "#00FF00" } - GradientStop { position: 0.5; color: "#00FFFF" } - GradientStop { position: 0.33; color: "#0000FF" } - GradientStop { position: 0.16; color: "#FF00FF" } - GradientStop { position: 0.0; color: "#FF0000" } - } - } - ColorSlider { - id: hueSlider; anchors.fill: parent - } - } - - BrightnessSlider { - id: brightnessSlider - Layout.fillHeight: true - Layout.preferredWidth: Mycroft.Units.gridUnit * 2 - } - } - } - - Rectangle { - id: popupBottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 5 - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - border.color: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5) - border.width: 1 - radius: 4 - - RowLayout { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: Mycroft.Units.gridUnit / 2 - - Kirigami.Icon { - id: backIconPopUp - source: "window-close-symbolic" - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIconPopUp - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: "Close" - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../../snd/clicked.wav")) - colorSelectSecondaryBox.close() - } - } - } - } -} - diff --git a/mycroft/res/ui/settings/delegates/ColorSlider.qml b/mycroft/res/ui/settings/delegates/ColorSlider.qml deleted file mode 100644 index ef491f5d7a49..000000000000 --- a/mycroft/res/ui/settings/delegates/ColorSlider.qml +++ /dev/null @@ -1,50 +0,0 @@ -// Vertical "slider" control used in colorpicker -import QtQuick 2.11 - -Item { - property int cursorHeight: 7 - property real value: (1 - pickerCursor.y/height) - width: 15; height: 300 - - Item { - id: pickerCursor - width: parent.width - Rectangle { - x: -3; y: -height*0.5 - width: parent.width + 4; height: cursorHeight - border.color: "black"; border.width: 1 - color: "transparent" - Rectangle { - anchors.fill: parent; anchors.margins: 2 - border.color: "white"; border.width: 1 - color: "transparent" - } - } - } - MouseArea { - y: -Math.round(cursorHeight/2) - height: parent.height+cursorHeight - anchors.left: parent.left - anchors.right: parent.right - function handleMouse(mouse) { - if (mouse.buttons & Qt.LeftButton) { - pickerCursor.y = Math.max(0, Math.min(height, mouse.y)-cursorHeight) - } - } - onPositionChanged: { - handleMouse(mouse) - } - onPressed: handleMouse(mouse) - } - - onVisibleChanged: { - if(visible) { - pickerCursor.y = 0 - } - } - - function setValue(val) { - pickerCursor.y = height * (1 - val) - } -} - diff --git a/mycroft/res/ui/settings/delegates/NameSelect.qml b/mycroft/res/ui/settings/delegates/NameSelect.qml deleted file mode 100644 index 8d1c8b69c3fc..000000000000 --- a/mycroft/res/ui/settings/delegates/NameSelect.qml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/mycroft/res/ui/settings/delegates/Palette.qml b/mycroft/res/ui/settings/delegates/Palette.qml deleted file mode 100644 index a6db244b6641..000000000000 --- a/mycroft/res/ui/settings/delegates/Palette.qml +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 - -Button { - id: control - property color target_color : "#21be2b" - property color border_color : Kirigami.Theme.textColor - property color selected_border_color : Kirigami.Theme.highlightColor - Layout.fillWidth: true - Layout.fillHeight: true - checkable: true - - onCheckedChanged: { - if(checked) { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../../snd/clicked.wav")) - } - } - - background: Rectangle { - border.color: (checked ? selected_border_color : border_color) - border.width: 4 - radius: 3 - - Rectangle { - anchors.fill: parent - anchors.margins: 4 - radius: 2 - color: target_color - } - } -} diff --git a/mycroft/res/ui/settings/delegates/PalettesGrid.qml b/mycroft/res/ui/settings/delegates/PalettesGrid.qml deleted file mode 100644 index 7e62fa7b5604..000000000000 --- a/mycroft/res/ui/settings/delegates/PalettesGrid.qml +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 - -Item { - id: item - property color palettsColor : "transparent" - - onPalettsColorChanged: { - createThemeView.selectedPrimaryColor = palettsColor - } - - implicitHeight: grid.height - implicitWidth: grid.width - - GridLayout { - id: grid - columns: 4 - anchors.fill: parent - - ButtonGroup { - id: group - } - - Palette { - ButtonGroup.group: group - target_color: "#000000" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#1A1A1A" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#012010" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#200A22" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#0D0D22" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#221D1A" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#242411" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#0c1821" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#0d1701" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#280607" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#170d01" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - - Palette { - ButtonGroup.group: group - target_color: "#0c0117" - onCheckedChanged: { - if(checked) { - item.palettsColor = target_color - } - } - } - } -} diff --git a/mycroft/res/ui/settings/delegates/SetNameBox.qml b/mycroft/res/ui/settings/delegates/SetNameBox.qml deleted file mode 100644 index 6f0fd2ec9a8f..000000000000 --- a/mycroft/res/ui/settings/delegates/SetNameBox.qml +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 - -Popup { - id: nameSelectBox - width: parent.width * 0.75 - height: parent.height * 0.75 - x: (parent.width - width) / 2 - y: (parent.height - height) / 2 - dim: true - property string nameValue - - onNameValueChanged: { - if(nameValue != "" && nameValue.length > 2 || nameValue != " " && nameValue.length > 2) { - createThemeView.selectedThemeName = nameValue[0].toUpperCase() + nameValue.slice(1) + " Scheme" - } else { - createThemeView.selectedThemeName = qsTr("Example Theme") - } - } - - Overlay.modeless: Rectangle { - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - } - - background: Rectangle { - color: Kirigami.Theme.backgroundColor - layer.enabled: true - layer.effect: DropShadow { - color: Kirigami.Theme.backgroundColor - transparentBorder: false - horizontalOffset: 0 - verticalOffset: 0 - spread: 0.2 - radius: 8 - samples: 16 - } - - Rectangle { - anchors.fill: parent - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - } - } - - contentItem: Item { - - Rectangle { - id: popupHeaderArea - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.6) - anchors.left: parent.left - anchors.right: parent.right - height: Mycroft.Units.gridUnit * 5 - radius: 4 - - Label { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Mycroft.Units.gridUnit / 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 32 - font.bold: true - minimumPixelSize: 5 - fontSizeMode: Text.Fit - maximumLineCount: 1 - text: qsTr("Set Scheme Name") - color: Kirigami.Theme.textColor - elide: Text.ElideRight - } - } - - TextField { - id: popupMainContent - anchors.top: popupHeaderArea.bottom - anchors.bottom: popupBottomArea.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Mycroft.Units.gridUnit / 2 - - background: Rectangle { - color: Kirigami.Theme.backgroundColor - border.width: 1 - border.color: Kirigami.Theme.textColor - radius: 6 - - Label { - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - visible: popupMainContent.activeFocus ? 0 : 1 - text: qsTr("Unique 1 word scheme name, example: Midnight") - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - wrapMode: Text.WordWrap - } - } - palette.text: Kirigami.Theme.textColor - validator: RegExpValidator { regExp: /^([A-z])*[^\s]\1*$/ } - onTextChanged: { - nameSelectBox.nameValue = popupMainContent.text - } - } - - Rectangle { - id: popupBottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 5 - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.1) - border.color: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.5) - border.width: 1 - radius: 4 - - RowLayout { - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: Mycroft.Units.gridUnit / 2 - - Kirigami.Icon { - id: backIconPopUp - source: "window-close-symbolic" - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIconPopUp - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - color: Kirigami.Theme.textColor - text: "Close" - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../../snd/clicked.wav")) - nameSelectBox.close() - } - } - } - } -} - diff --git a/mycroft/res/ui/settings/developer_settings.qml b/mycroft/res/ui/settings/developer_settings.qml deleted file mode 100644 index 23695199e7b0..000000000000 --- a/mycroft/res/ui/settings/developer_settings.qml +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.5 as Kirigami -import Mycroft 1.0 as Mycroft -import QtGraphicalEffects 1.12 - -Item { - id: developerSettingsView - anchors.fill: parent - property bool dashActive: sessionData.dashboard_enabled ? Boolean(sessionData.dashboard_enabled) : false - property bool busyVisible: false - - onDashActiveChanged: { - developerSettingsView.busyVisible = false - } - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: brightnessSettingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: "Developer Settings" - color: Kirigami.Theme.textColor - } - } - - Item { - id: viewBusyOverlay - z: 300 - anchors.top: topArea.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - visible: developerSettingsView.busyVisible - enabled: visible - - BusyIndicator { - id: viewBusyIndicator - visible: viewBusyOverlay.visible - anchors.centerIn: parent - running: viewBusyOverlay.visible - enabled: viewBusyOverlay.visible - } - } - - Flickable { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: midBottomArea.top - contentWidth: width - contentHeight: colMiddleContents.implicitHeight - clip: true - - ColumnLayout { - id: colMiddleContents - anchors.left: parent.left - anchors.right: parent.right - spacing: Kirigami.Units.smallSpacing - - Kirigami.Heading { - id: warnText - level: 3 - Layout.fillWidth: true - wrapMode: Text.WordWrap - color: Kirigami.Theme.textColor - text: "Enabling OVOS Dashboard will provide you access to control various services on this device, the OVOS Dashboard can be accessed on any device located in your LAN network" - } - - Item { - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.largeSpacing - } - - Button { - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 3 - text: "Enable Dashboard" - visible: !dashActive - enabled: visible - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.enable.dash", {}) - developerSettingsView.busyVisible = true - } - } - - Button { - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 3 - text: "Disable Dashboard" - visible: dashActive - enabled: visible - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.disable.dash", {}) - developerSettingsView.busyVisible = true - } - } - - Kirigami.Separator { - Layout.fillWidth: true - Layout.preferredHeight: 1 - visible: dashActive - enabled: visible - } - - Kirigami.Heading { - Layout.fillWidth: true - wrapMode: Text.WordWrap - level: 3 - color: Kirigami.Theme.textColor - text: "Dashboard Address: " + sessionData.dashboard_url - visible: dashActive - enabled: visible - } - - Kirigami.Heading { - Layout.fillWidth: true - wrapMode: Text.WordWrap - level: 3 - color: Kirigami.Theme.textColor - text: "Dashboard Username: " + sessionData.dashboard_user - visible: dashActive - enabled: visible - } - - Kirigami.Heading { - Layout.fillWidth: true - wrapMode: Text.WordWrap - level: 3 - color: Kirigami.Theme.textColor - text: "Dashboard Password: " + sessionData.dashboard_password - visible: dashActive - enabled: visible - } - } - } - - Item { - id: midBottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - height: Math.max(Mycroft.Units.gridUnit * 5, Kirigami.Units.iconSizes.large) - - Kirigami.Separator { - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - height: 1 - } - - Button { - id: advancedSettingButton - width: parent.width - height: Math.max(Mycroft.Units.gridUnit * 5, Kirigami.Units.iconSizes.large) - - background: Rectangle { - id: advancedSettingButtonBg - color: "transparent" - } - - contentItem: RowLayout { - Image { - id: iconAdvancedSettingHolder - Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - source: "images/settings.png" - - ColorOverlay { - anchors.fill: parent - source: iconAdvancedSettingHolder - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.7) - } - } - - - Kirigami.Heading { - id: connectionNameLabel - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - verticalAlignment: Text.AlignVCenter - height: paintedHeight - elide: Text.ElideRight - font.weight: Font.DemiBold - text: "Advanced Settings" - textFormat: Text.PlainText - color: Kirigami.Theme.textColor - level: 2 - } - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("ovos.phal.configuration.provider.list.groups", {}) - } - - onPressed: { - advancedSettingButtonBg.color = Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.4) - } - onReleased: { - advancedSettingButtonBg.color = "transparent" - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - text: "Device Settings" - color: Kirigami.Theme.textColor - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.settings", {}) - } - } - } -} diff --git a/mycroft/res/ui/settings/display_settings.qml b/mycroft/res/ui/settings/display_settings.qml deleted file mode 100644 index 6df1aa33b6a7..000000000000 --- a/mycroft/res/ui/settings/display_settings.qml +++ /dev/null @@ -1,497 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 - -Item { - id: displaySettingsView - anchors.fill: parent - property bool wallpaper_rotation_enabled: false - property bool auto_dim_enabled: sessionData.display_auto_dim ? sessionData.display_auto_dim : 0 - property bool auto_nightmode_enabled: sessionData.display_auto_nightmode ? sessionData.display_auto_nightmode : 0 - property bool menuLabelsEnabled: false - - function getAutoRotation() { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.get.auto.rotation", {}) - } - - Component.onCompleted: { - getAutoRotation() - Mycroft.MycroftController.sendRequest("ovos.shell.get.menuLabels.status", {}) - } - - Connections { - target: Mycroft.MycroftController - onIntentRecevied: { - if (type == "ovos.shell.get.menuLabels.status.response") { - menuLabelsEnabled = data.enabled - } - if (type == "ovos.wallpaper.manager.get.auto.rotation.response") { - wallpaper_rotation_enabled = data.auto_rotation - } - } - } - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: idleSettingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("Display Settings") - color: Kirigami.Theme.textColor - } - } - - ScrollBar { - id: flickAreaScrollBar - anchors.right: parent.right - width: Mycroft.Units.gridUnit - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.bottom: bottomArea.top - } - - Flickable { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: flickAreaScrollBar.left - anchors.bottom: midBottomArea.top - contentWidth: width - contentHeight: mainColLayoutDisplaySettings.implicitHeight - ScrollBar.vertical: flickAreaScrollBar - clip: true - - ColumnLayout { - id: mainColLayoutDisplaySettings - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: Mycroft.Units.gridUnit / 2 - - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: displaySettingItemOneLabel.implicitHeight + Mycroft.Units.gridUnit - color: Qt.lighter(Kirigami.Theme.backgroundColor, 2) - border.width: 1 - border.color: Qt.darker(Kirigami.Theme.textColor, 1.5) - radius: 6 - - ColumnLayout { - id: displaySettingItemOneLabel - anchors.left: parent.left - anchors.right: autoWallpaperRotationSwitch.left - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: Mycroft.Units.gridUnit / 2 - - Label { - id: settingOneLabel - text: qsTr("Wallpaper Rotation") - font.pixelSize: 18 - fontSizeMode: Text.Fit - minimumPixelSize: 14 - color: Kirigami.Theme.textColor - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignLeft - } - - Label { - text: qsTr("Changes the wallpaper automatically") - font.pixelSize: settingOneLabel.font.pixelSize / 1.5 - color: Kirigami.Theme.textColor - wrapMode: Text.WordWrap - elide: Text.ElideRight - maximumLineCount: 1 - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignLeft - } - } - - Button { - id: autoWallpaperRotationSwitch - width: Mycroft.Units.gridUnit * 10 - anchors.right: parent.right - anchors.rightMargin: Mycroft.Units.gridUnit / 2 - height: parent.height - Mycroft.Units.gridUnit / 2 - anchors.verticalCenter: parent.verticalCenter - checkable: true - checked: displaySettingsView.wallpaper_rotation_enabled - text: checked ? qsTr("ON") : qsTr("OFF") - - Kirigami.Icon { - source: autoWallpaperRotationSwitch.checked ? Qt.resolvedUrl("images/switch-green.svg") : Qt.resolvedUrl("images/switch-red.svg") - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 8 - height: Kirigami.Units.iconSizes.medium - width: Kirigami.Units.iconSizes.medium - } - - onClicked: { - console.log(autoWallpaperRotationSwitch.checked) - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("speaker.extension.display.set.wallpaper.rotation", {"wallpaper_rotation": autoWallpaperRotationSwitch.checked}) - } - } - } - - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: displaySettingItemTwoLabel.implicitHeight + Mycroft.Units.gridUnit - color: Qt.lighter(Kirigami.Theme.backgroundColor, 2) - border.width: 1 - border.color: Qt.darker(Kirigami.Theme.textColor, 1.5) - radius: 6 - - ColumnLayout { - id: displaySettingItemTwoLabel - anchors.left: parent.left - anchors.right: autoDimSwitch.left - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: Mycroft.Units.gridUnit / 2 - - Label { - id: settingTwoLabel - text: qsTr("Auto Dim") - font.pixelSize: 18 - fontSizeMode: Text.Fit - minimumPixelSize: 14 - color: Kirigami.Theme.textColor - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignLeft - } - - Label { - text: qsTr("Dim's the display in 60 seconds") - font.pixelSize: settingTwoLabel.font.pixelSize / 1.5 - wrapMode: Text.WordWrap - elide: Text.ElideRight - color: Kirigami.Theme.textColor - maximumLineCount: 1 - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignLeft - } - } - - Button { - id: autoDimSwitch - width: Mycroft.Units.gridUnit * 10 - anchors.right: parent.right - anchors.rightMargin: Mycroft.Units.gridUnit / 2 - height: parent.height - Mycroft.Units.gridUnit / 2 - anchors.verticalCenter: parent.verticalCenter - checkable: true - checked: displaySettingsView.auto_dim_enabled - text: checked ? qsTr("ON") : qsTr("OFF") - - Kirigami.Icon { - source: autoDimSwitch.checked ? Qt.resolvedUrl("images/switch-green.svg") : Qt.resolvedUrl("images/switch-red.svg") - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 8 - height: Kirigami.Units.iconSizes.medium - width: Kirigami.Units.iconSizes.medium - } - - onClicked: { - console.log(autoDimSwitch.checked) - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("speaker.extension.display.set.auto.dim", {"auto_dim": autoDimSwitch.checked}) - } - } - } - - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: displaySettingItemThreeLabel.implicitHeight + Mycroft.Units.gridUnit - color: Qt.lighter(Kirigami.Theme.backgroundColor, 2) - border.width: 1 - border.color: Qt.darker(Kirigami.Theme.textColor, 1.5) - radius: 6 - - ColumnLayout { - id: displaySettingItemThreeLabel - anchors.left: parent.left - anchors.right: autoNightmodeSwitch.left - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: Mycroft.Units.gridUnit / 2 - - Label { - id: settingThreeLabel - text: qsTr("Auto Nightmode") - font.pixelSize: 18 - fontSizeMode: Text.Fit - minimumPixelSize: 14 - color: Kirigami.Theme.textColor - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignLeft - } - - Label { - text: qsTr("Activates nightmode on homescreen, depending on the time of the day") - font.pixelSize: settingThreeLabel.font.pixelSize / 1.5 - color: Kirigami.Theme.textColor - elide: Text.ElideRight - wrapMode: Text.WordWrap - maximumLineCount: 1 - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignLeft - } - } - - Button { - id: autoNightmodeSwitch - width: Mycroft.Units.gridUnit * 10 - anchors.right: parent.right - anchors.rightMargin: Mycroft.Units.gridUnit / 2 - height: parent.height - Mycroft.Units.gridUnit / 2 - anchors.verticalCenter: parent.verticalCenter - checkable: true - checked: displaySettingsView.auto_nightmode_enabled - text: checked ? qsTr("ON") : qsTr("OFF") - - Kirigami.Icon { - source: autoNightmodeSwitch.checked ? Qt.resolvedUrl("images/switch-green.svg") : Qt.resolvedUrl("images/switch-red.svg") - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 8 - height: Kirigami.Units.iconSizes.medium - width: Kirigami.Units.iconSizes.medium - } - - onClicked: { - console.log(autoNightmodeSwitch.checked) - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("speaker.extension.display.set.auto.nightmode", {"auto_nightmode": autoNightmodeSwitch.checked}) - } - } - } - - Rectangle { - Layout.fillWidth: true - Layout.preferredHeight: displaySettingItemFourLabel.implicitHeight + Mycroft.Units.gridUnit - color: Qt.lighter(Kirigami.Theme.backgroundColor, 2) - border.width: 1 - border.color: Qt.darker(Kirigami.Theme.textColor, 1.5) - radius: 6 - - ColumnLayout { - id: displaySettingItemFourLabel - anchors.left: parent.left - anchors.right: displayMenuLabelsSwitch.left - anchors.verticalCenter: parent.verticalCenter - anchors.leftMargin: Mycroft.Units.gridUnit / 2 - - Label { - id: settingFourLabel - text: qsTr("Display Menu Labels") - font.pixelSize: 18 - fontSizeMode: Text.Fit - minimumPixelSize: 14 - color: Kirigami.Theme.textColor - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignLeft - } - - Label { - text: qsTr("Enable|Disable display of menu labels") - font.pixelSize: settingFourLabel.font.pixelSize / 1.5 - color: Kirigami.Theme.textColor - elide: Text.ElideRight - wrapMode: Text.WordWrap - maximumLineCount: 1 - Layout.fillWidth: true - Layout.fillHeight: true - Layout.alignment: Qt.AlignLeft - } - } - - Button { - id: displayMenuLabelsSwitch - width: Mycroft.Units.gridUnit * 10 - anchors.right: parent.right - anchors.rightMargin: Mycroft.Units.gridUnit / 2 - height: parent.height - Mycroft.Units.gridUnit / 2 - anchors.verticalCenter: parent.verticalCenter - checkable: true - checked: displaySettingsView.menuLabelsEnabled - text: checked ? qsTr("ON") : qsTr("OFF") - - Kirigami.Icon { - source: displayMenuLabelsSwitch.checked ? Qt.resolvedUrl("images/switch-green.svg") : Qt.resolvedUrl("images/switch-red.svg") - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 8 - height: Kirigami.Units.iconSizes.medium - width: Kirigami.Units.iconSizes.medium - } - - onClicked: { - console.log(displayMenuLabelsSwitch.checked) - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("ovos.shell.set.menuLabels", {"enabled": displayMenuLabelsSwitch.checked}) - } - } - } - } - } - - Item { - id: midBottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - height: Math.max(Mycroft.Units.gridUnit * 5, Kirigami.Units.iconSizes.large) - - Kirigami.Separator { - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - height: 1 - } - - Button { - id: wallpaperSettingButton - width: parent.width - height: Math.max(Mycroft.Units.gridUnit * 5, Kirigami.Units.iconSizes.large) - - background: Rectangle { - id: wallpaperSettingButtonBg - color: "transparent" - } - - contentItem: RowLayout { - Image { - id: iconWallpaperSettingHolder - Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - source: "images/settings.png" - - ColorOverlay { - anchors.fill: parent - source: iconWallpaperSettingHolder - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.7) - } - } - - - Kirigami.Heading { - id: connectionNameLabel - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - verticalAlignment: Text.AlignVCenter - height: paintedHeight - elide: Text.ElideRight - font.weight: Font.DemiBold - text: "Wallpaper Settings" - textFormat: Text.PlainText - color: Kirigami.Theme.textColor - level: 2 - } - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - console.log("Sending Show Wallpaper Page Here") - triggerGuiEvent("mycroft.device.settings.wallpapers", {}) - } - - onPressed: { - wallpaperSettingButtonBg.color = Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.4) - } - onReleased: { - wallpaperSettingButtonBg.color = "transparent" - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - text: qsTr("Device Settings") - color: Kirigami.Theme.textColor - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - triggerGuiEvent("mycroft.device.settings", {}) - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - } - } - } -} diff --git a/mycroft/res/ui/settings/factory_settings.qml b/mycroft/res/ui/settings/factory_settings.qml deleted file mode 100644 index d0db14619bed..000000000000 --- a/mycroft/res/ui/settings/factory_settings.qml +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Copyright 2022 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.12 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.0 - -Item { - id: factorySettingsView - anchors.fill: parent - property bool horizontalMode: width > height ? 1 :0 - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: idleSettingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("Factory Reset Settings") - color: Kirigami.Theme.textColor - } - } - - Flickable { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - contentWidth: width - contentHeight: factorySettingsLayout.implicitHeight - ScrollBar.vertical: ScrollBar { - width: Mycroft.Units.gridUnit - anchors.right: parent.right - } - clip: true - - GridLayout { - id: factorySettingsLayout - width: parent.width - Mycroft.Units.gridUnit * 2 - anchors.horizontalCenter: parent.horizontalCenter - columns: horizontalMode ? 2 : 1 - columnSpacing: Mycroft.Units.gridUnit / 2 - rowSpacing: Mycroft.Units.gridUnit / 2 - - Button { - text: qsTr("Wipe Cache") - Layout.alignment: Qt.AlignHCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 4 - - background: Rectangle { - Kirigami.Theme.inherit: false - Kirigami.Theme.colorSet: Kirigami.Theme.Button - color: Kirigami.Theme.backgroundColor - border.width: 1 - border.color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - radius: 6 - } - - contentItem: Label { - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: qsTr("Wipe Cache") - color: Kirigami.Theme.textColor - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("system.factory.reset", {"wipe_cache": true, "wipe_data": false, "wipe_logs": false, "wipe_config": false, "reset_hardware": false}) - } - - onPressed: { - opacity = 0.5 - } - onReleased: { - opacity = 1 - } - } - - Button { - Layout.alignment: Qt.AlignHCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 4 - - background: Rectangle { - Kirigami.Theme.inherit: false - Kirigami.Theme.colorSet: Kirigami.Theme.Button - color: Kirigami.Theme.backgroundColor - border.width: 1 - border.color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - radius: 6 - } - - contentItem: Label { - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: qsTr("Wipe Config") - color: Kirigami.Theme.textColor - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("system.factory.reset", {"wipe_cache": false, "wipe_data": false, "wipe_logs": false, "wipe_config": true, "reset_hardware": false}) - } - - onPressed: { - opacity = 0.5 - } - onReleased: { - opacity = 1 - } - } - - Button { - Layout.alignment: Qt.AlignHCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 4 - - - background: Rectangle { - Kirigami.Theme.inherit: false - Kirigami.Theme.colorSet: Kirigami.Theme.Button - color: Kirigami.Theme.backgroundColor - border.width: 1 - border.color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - radius: 6 - } - - contentItem: Label { - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: qsTr("Wipe Data") - color: Kirigami.Theme.textColor - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("system.factory.reset", {"wipe_cache": false, "wipe_data": true, "wipe_logs": false, "wipe_config": false, "reset_hardware": false}) - } - - onPressed: { - opacity = 0.5 - } - onReleased: { - opacity = 1 - } - } - - Button { - Layout.alignment: Qt.AlignHCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 4 - - background: Rectangle { - Kirigami.Theme.inherit: false - Kirigami.Theme.colorSet: Kirigami.Theme.Button - color: Kirigami.Theme.backgroundColor - border.width: 1 - border.color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - radius: 6 - } - - contentItem: Label { - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: qsTr("Wipe Logs") - color: Kirigami.Theme.textColor - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("system.factory.reset", {"wipe_cache": false, "wipe_data": false, "wipe_logs": true, "wipe_config": false, "reset_hardware": false}) - } - - onPressed: { - opacity = 0.5 - } - onReleased: { - opacity = 1 - } - } - - Button { - id: factoryResetButton - Layout.alignment: Qt.AlignHCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 4 - - background: Rectangle { - Kirigami.Theme.inherit: false - Kirigami.Theme.colorSet: Kirigami.Theme.Button - color: Kirigami.Theme.backgroundColor - border.width: 1 - border.color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - radius: 6 - } - - contentItem: Label { - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - text: qsTr("Factory Reset") - color: Kirigami.Theme.textColor - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("system.factory.reset", {"wipe_cache": true, "wipe_data": true, "wipe_logs": true, "wipe_config": true, "reset_hardware": true}) - } - - onPressed: { - opacity = 0.5 - } - onReleased: { - opacity = 1 - } - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - text: qsTr("Device Settings") - color: Kirigami.Theme.textColor - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.settings", {}) - } - } - } -} diff --git a/mycroft/res/ui/settings/homescreen_settings.qml b/mycroft/res/ui/settings/homescreen_settings.qml deleted file mode 100644 index 0e0f327c4b18..000000000000 --- a/mycroft/res/ui/settings/homescreen_settings.qml +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.5 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore -import Mycroft 1.0 as Mycroft -import QtGraphicalEffects 1.12 - -Item { - id: homeScreenSettingsView - anchors.fill: parent - property var modelItemList: mainLoaderView.idleScreenList - property var activeIdle: mainLoaderView.activeIdle - - ButtonGroup { - id: idleSelectionGroup - } - - onModelItemListChanged: { - listIdleFaces.model = modelItemList.screenBlob - } - - function checkIfActive(screenId){ - if(screenId == activeIdle) { - return true - } else { - return false - } - } - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: idleSettingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("Homescreen Settings") - color: Kirigami.Theme.textColor - } - } - - Item { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - - ListView { - id: listIdleFaces - anchors.fill: parent - clip: true - boundsBehavior: Flickable.StopAtBounds - delegate: Kirigami.AbstractListItem { - activeBackgroundColor: Qt.rgba(1, 0, 0, 0.7) - contentItem: Item { - implicitWidth: delegateLayout.implicitWidth; - implicitHeight: delegateLayout.implicitHeight; - - ColumnLayout { - id: delegateLayout - anchors { - left: parent.left; - top: parent.top; - right: parent.right; - } - - RowLayout { - Layout.fillWidth: true - spacing: Math.round(units.gridUnit / 2) - - Kirigami.Heading { - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - height: paintedHeight - elide: Text.ElideRight - font.weight: Font.DemiBold - verticalAlignment: Text.AlignVCenter - color: Kirigami.Theme.textColor - text: modelData.name - textFormat: Text.PlainText - level: 2 - } - - Image { - id: selectedItemIcon - Layout.alignment: Qt.AlignVCenter | Qt.AlignRight - Layout.preferredHeight: units.iconSizes.medium - Layout.preferredWidth: units.iconSizes.medium - visible: checkIfActive(modelData.id) - source: "images/tick.svg" - } - } - } - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.set.idle", {"selected": modelData.id}) - } - } - - Component.onCompleted: { - listIdleFaces.count - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - text: qsTr("Device Settings") - color: Kirigami.Theme.textColor - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.settings", {}) - } - } - } -} diff --git a/mycroft/res/ui/settings/images/back.png b/mycroft/res/ui/settings/images/back.png deleted file mode 100644 index 6955e2e18698..000000000000 Binary files a/mycroft/res/ui/settings/images/back.png and /dev/null differ diff --git a/mycroft/res/ui/settings/images/back.svg b/mycroft/res/ui/settings/images/back.svg deleted file mode 100644 index 77f35adc738b..000000000000 --- a/mycroft/res/ui/settings/images/back.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - diff --git a/mycroft/res/ui/settings/images/display.svg b/mycroft/res/ui/settings/images/display.svg deleted file mode 100644 index ea13f46c4601..000000000000 --- a/mycroft/res/ui/settings/images/display.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/mycroft/res/ui/settings/images/home.svg b/mycroft/res/ui/settings/images/home.svg deleted file mode 100644 index f7c9d4d6bc9b..000000000000 --- a/mycroft/res/ui/settings/images/home.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mycroft/res/ui/settings/images/info.svg b/mycroft/res/ui/settings/images/info.svg deleted file mode 100644 index 5e9ea0811760..000000000000 --- a/mycroft/res/ui/settings/images/info.svg +++ /dev/null @@ -1,122 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mycroft/res/ui/settings/images/next.svg b/mycroft/res/ui/settings/images/next.svg deleted file mode 100644 index 815e33fd2d44..000000000000 --- a/mycroft/res/ui/settings/images/next.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - diff --git a/mycroft/res/ui/settings/images/paint.svg b/mycroft/res/ui/settings/images/paint.svg deleted file mode 100644 index 19881b3705ba..000000000000 --- a/mycroft/res/ui/settings/images/paint.svg +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mycroft/res/ui/settings/images/power.svg b/mycroft/res/ui/settings/images/power.svg deleted file mode 100644 index e5fcff6fc85d..000000000000 --- a/mycroft/res/ui/settings/images/power.svg +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/mycroft/res/ui/settings/images/restart.svg b/mycroft/res/ui/settings/images/restart.svg deleted file mode 100644 index b1d5e94e696e..000000000000 --- a/mycroft/res/ui/settings/images/restart.svg +++ /dev/null @@ -1,116 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mycroft/res/ui/settings/images/settings.png b/mycroft/res/ui/settings/images/settings.png deleted file mode 100644 index c4a4d4b987fb..000000000000 Binary files a/mycroft/res/ui/settings/images/settings.png and /dev/null differ diff --git a/mycroft/res/ui/settings/images/ssh.svg b/mycroft/res/ui/settings/images/ssh.svg deleted file mode 100644 index cea7e2ed500d..000000000000 --- a/mycroft/res/ui/settings/images/ssh.svg +++ /dev/null @@ -1,201 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mycroft/res/ui/settings/images/switch-green.svg b/mycroft/res/ui/settings/images/switch-green.svg deleted file mode 100644 index a2fd788a584d..000000000000 --- a/mycroft/res/ui/settings/images/switch-green.svg +++ /dev/null @@ -1,101 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mycroft/res/ui/settings/images/switch-red.svg b/mycroft/res/ui/settings/images/switch-red.svg deleted file mode 100644 index 3811643f05c3..000000000000 --- a/mycroft/res/ui/settings/images/switch-red.svg +++ /dev/null @@ -1,100 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mycroft/res/ui/settings/images/tick.svg b/mycroft/res/ui/settings/images/tick.svg deleted file mode 100644 index a67b57af3fe2..000000000000 --- a/mycroft/res/ui/settings/images/tick.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/mycroft/res/ui/settings/lupdate-generator.sh b/mycroft/res/ui/settings/lupdate-generator.sh deleted file mode 100755 index 34bf85203f19..000000000000 --- a/mycroft/res/ui/settings/lupdate-generator.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -lupdate settingspage.qml -ts settingspage_de.ts -lupdate settingspage.qml -ts settingspage_es.ts -lupdate settingspage.qml -ts settingspage_fr.ts -lupdate settingspage.qml -ts settingspage_nl.ts -lupdate settingspage.qml -ts settingspage_pt.ts -lupdate settingspage.qml -ts settingspage_it.ts - -lupdate homescreen_settings.qml -ts homescreen_settings_de.ts -lupdate homescreen_settings.qml -ts homescreen_settings_es.ts -lupdate homescreen_settings.qml -ts homescreen_settings_fr.ts -lupdate homescreen_settings.qml -ts homescreen_settings_nl.ts -lupdate homescreen_settings.qml -ts homescreen_settings_pt.ts -lupdate homescreen_settings.qml -ts homescreen_settings_it.ts - -lupdate developer_settings.qml -ts developer_settings_de.ts -lupdate developer_settings.qml -ts developer_settings_es.ts -lupdate developer_settings.qml -ts developer_settings_fr.ts -lupdate developer_settings.qml -ts developer_settings_nl.ts -lupdate developer_settings.qml -ts developer_settings_pt.ts -lupdate developer_settings.qml -ts developer_settings_it.ts - -lupdate display_settings.qml -ts display_settings_de.ts -lupdate display_settings.qml -ts display_settings_es.ts -lupdate display_settings.qml -ts display_settings_fr.ts -lupdate display_settings.qml -ts display_settings_nl.ts -lupdate display_settings.qml -ts display_settings_pt.ts -lupdate display_settings.qml -ts display_settings_it.ts - -lupdate customize_settings.qml -ts customize_settings_de.ts -lupdate customize_settings.qml -ts customize_settings_es.ts -lupdate customize_settings.qml -ts customize_settings_fr.ts -lupdate customize_settings.qml -ts customize_settings_nl.ts -lupdate customize_settings.qml -ts customize_settings_pt.ts -lupdate customize_settings.qml -ts customize_settings_it.ts - -lupdate customize_theme.qml -ts customize_theme_de.ts -lupdate customize_theme.qml -ts customize_theme_es.ts -lupdate customize_theme.qml -ts customize_theme_fr.ts -lupdate customize_theme.qml -ts customize_theme_nl.ts -lupdate customize_theme.qml -ts customize_theme_pt.ts -lupdate customize_theme.qml -ts customize_theme_it.ts - -lupdate configuration_groups_display.qml -ts configuration_groups_display_de.ts -lupdate configuration_groups_display.qml -ts configuration_groups_display_es.ts -lupdate configuration_groups_display.qml -ts configuration_groups_display_fr.ts -lupdate configuration_groups_display.qml -ts configuration_groups_display_nl.ts -lupdate configuration_groups_display.qml -ts configuration_groups_display_pt.ts -lupdate configuration_groups_display.qml -ts configuration_groups_display_it.ts - -lupdate configuration_generator_display.qml -ts configuration_generator_display_de.ts -lupdate configuration_generator_display.qml -ts configuration_generator_display_es.ts -lupdate configuration_generator_display.qml -ts configuration_generator_display_fr.ts -lupdate configuration_generator_display.qml -ts configuration_generator_display_nl.ts -lupdate configuration_generator_display.qml -ts configuration_generator_display_pt.ts -lupdate configuration_generator_display.qml -ts configuration_generator_display_it.ts - -lupdate delegate/SetNameBox.qml -ts SetNameBox_de.ts -lupdate delegate/SetNameBox.qml -ts SetNameBox_es.ts -lupdate delegate/SetNameBox.qml -ts SetNameBox_fr.ts -lupdate delegate/SetNameBox.qml -ts SetNameBox_nl.ts -lupdate delegate/SetNameBox.qml -ts SetNameBox_pt.ts -lupdate delegate/SetNameBox.qml -ts SetNameBox_it.ts - -lupdate configuration_ui/settingListBox.qml -ts settingListBox_de.ts -lupdate configuration_ui/settingListBox.qml -ts settingListBox_es.ts -lupdate configuration_ui/settingListBox.qml -ts settingListBox_fr.ts -lupdate configuration_ui/settingListBox.qml -ts settingListBox_nl.ts -lupdate configuration_ui/settingListBox.qml -ts settingListBox_pt.ts -lupdate configuration_ui/settingListBox.qml -ts settingListBox_it.ts diff --git a/mycroft/res/ui/settings/settingspage.qml b/mycroft/res/ui/settings/settingspage.qml deleted file mode 100644 index 39f5f312f6b0..000000000000 --- a/mycroft/res/ui/settings/settingspage.qml +++ /dev/null @@ -1,202 +0,0 @@ -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.kirigami 2.5 as Kirigami -import Mycroft 1.0 as Mycroft -import QtGraphicalEffects 1.12 - -Item { - id: deviceSettingsView - anchors.fill: parent - z: 2 - - ListModel { - id: settingsListModel - - ListElement { - settingIcon: "images/home.svg" - settingName: QT_TR_NOOP("Homescreen Settings") - settingEvent: "mycroft.device.settings.homescreen" - settingCall: "show homescreen settings" - } - ListElement { - settingIcon: "images/paint.svg" - settingName: QT_TR_NOOP("Customize") - settingEvent: "mycroft.device.settings.customize" - settingCall: "" - } - ListElement { - settingIcon: "images/display.svg" - settingName: QT_TR_NOOP("Display") - settingEvent: "mycroft.device.settings.display" - settingCall: "" - } - ListElement { - settingIcon: "images/ssh.svg" - settingName: QT_TR_NOOP("Enable SSH") - settingEvent: "mycroft.device.settings.ssh" - settingCall: "show ssh settings" - } - ListElement { - settingIcon: "images/settings.png" - settingName: QT_TR_NOOP("Developer Settings") - settingEvent: "mycroft.device.settings.developer" - settingCall: "" - } - ListElement { - settingIcon: "images/restart.svg" - settingName: QT_TR_NOOP("Factory Settings") - settingEvent: "mycroft.device.settings.factory" - settingCall: "" - } - ListElement { - settingIcon: "images/info.svg" - settingName: QT_TR_NOOP("About") - settingEvent: "mycroft.device.settings.about.page" - settingCall: "" - } - } - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: settingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("Device Settings") - color: Kirigami.Theme.textColor - } - } - - Item { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - anchors.bottomMargin: Kirigami.Units.largeSpacing - - ListView { - anchors.fill: parent - clip: true - model: settingsListModel - boundsBehavior: Flickable.StopAtBounds - delegate: Kirigami.AbstractListItem { - activeBackgroundColor: Qt.rgba(Kirigami.Theme.highlightColor.r, Kirigami.Theme.highlightColor.g, Kirigami.Theme.highlightColor.b, 0.7) - contentItem: Item { - implicitWidth: delegateLayout.implicitWidth; - implicitHeight: delegateLayout.implicitHeight; - - ColumnLayout { - id: delegateLayout - anchors { - left: parent.left; - top: parent.top; - right: parent.right; - } - - RowLayout { - Layout.fillWidth: true - spacing: Math.round(units.gridUnit / 2) - - Image { - id: iconSettingHolder - Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft - Layout.preferredHeight: units.iconSizes.medium - Layout.preferredWidth: units.iconSizes.medium - source: model.settingIcon - - ColorOverlay { - anchors.fill: parent - source: iconSettingHolder - color: Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.7) - } - } - - - Kirigami.Heading { - id: connectionNameLabel - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - verticalAlignment: Text.AlignVCenter - height: paintedHeight - elide: Text.ElideRight - font.weight: Font.DemiBold - text: qsTr(model.settingName) - textFormat: Text.PlainText - color: Kirigami.Theme.textColor - level: 2 - } - } - } - } - - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent(model.settingEvent, {}) - } - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - text: qsTr("Home") - color: Kirigami.Theme.textColor - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.show.idle", {}) - } - } - } -} diff --git a/mycroft/res/ui/settings/ssh_settings.qml b/mycroft/res/ui/settings/ssh_settings.qml deleted file mode 100644 index 69cd3c28a15a..000000000000 --- a/mycroft/res/ui/settings/ssh_settings.qml +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.0 -import org.kde.kirigami 2.5 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore -import Mycroft 1.0 as Mycroft -import QtGraphicalEffects 1.12 - -Item { - id: sshSettingsView - anchors.fill: parent - property bool connectionActive: false - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: brightnessSettingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("SSH Settings") - color: Kirigami.Theme.textColor - } - } - - Item { - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: bottomArea.top - - ColumnLayout { - anchors.left: parent.left - anchors.right: parent.right - spacing: Kirigami.Units.smallSpacing - - Kirigami.Heading { - id: warnText - level: 3 - Layout.fillWidth: true - wrapMode: Text.WordWrap - color: Kirigami.Theme.textColor - text: qsTr("By enabling SSH Mode, anyone can access, change or delete anything on this device by connecting to it via another device.") - } - - Item { - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.largeSpacing - } - - Button { - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 3 - text: qsTr("Enable SSH") - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("system.ssh.enable", {"display": false}) - } - } - - Button { - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 3 - text: qsTr("Disable SSH") - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - Mycroft.MycroftController.sendRequest("system.ssh.disable", {"display": false}) - } - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - text: qsTr("Device Settings") - color: Kirigami.Theme.textColor - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - triggerGuiEvent("mycroft.device.settings", {}) - } - } - } -} diff --git a/mycroft/res/ui/settings/wallpaper_settings.qml b/mycroft/res/ui/settings/wallpaper_settings.qml deleted file mode 100644 index 6126026e25aa..000000000000 --- a/mycroft/res/ui/settings/wallpaper_settings.qml +++ /dev/null @@ -1,680 +0,0 @@ -/* - * Copyright 2018 Aditya Mehra - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import QtQuick.Layouts 1.4 -import QtQuick 2.4 -import QtQuick.Controls 2.11 -import org.kde.kirigami 2.11 as Kirigami -import org.kde.plasma.core 2.0 as PlasmaCore -import Mycroft 1.0 as Mycroft -import OVOSPlugin 1.0 as OVOSPlugin -import QtGraphicalEffects 1.12 - -Item { - id: wallpaperSettings - anchors.fill: parent - property var currentProvider - property var currentWallpaper - property var providersModel - property var wallpapersProviderCollection - property bool providerHasCollection - property bool providerIsConfigurable - property bool wallpaperRotation: false - - Connections { - target: Mycroft.MycroftController - onIntentRecevied: { - if (type == "ovos.wallpaper.manager.get.active.provider.response") { - currentProvider = data.active_provider - } - if (type == "ovos.wallpaper.manager.get.registered.providers.response") { - var model = {"providers": data.registered_providers} - providersModel = model.providers - providersComboBox.model = providersModel - } - if (type == "ovos.wallpaper.manager.get.wallpaper.response") { - currentWallpaper = data.url - } - if (type == "ovos.wallpaper.manager.get.auto.rotation.response") { - wallpaperRotation = data.auto_rotation - } - if (type == "ovos.wallpaper.manager.get.provider.config.response") { - configureProviderPopupDialog.providerName = data.provider_name - configureProviderPopupDialog.providerConfiguration = convertConfigToArray(data.config) - } - if (type == "homescreen.wallpaper.set") { - currentWallpaper = data.url - } - if (type == "ovos.phal.wallpaper.manager.provider.registered") { - getRegisteredProviders() - } - } - } - - function getActiveProvider() { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.get.active.provider", {}) - } - - function getRegisteredProviders() { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.get.registered.providers", {}) - } - - function getCurrentWallpaper() { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.get.wallpaper", {}) - } - - function getAutoRotation() { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.get.auto.rotation", {}) - } - - function refreshProvider() { - var idx = providersComboBox.currentIndex - wallpapersProviderCollection = providersComboBox.model[idx].wallpaper_collection - providerIsConfigurable = providersComboBox.model[idx].provider_configurable - if(wallpapersProviderCollection.length > 0) { - providerHasCollection = true - } else { - providerHasCollection = false - } - wallpapersView.forceLayout() - } - - function getProviderConfig() { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.get.provider.config", {"provider_name": providersComboBox.currentValue}) - } - - function convertConfigToArray(obj) { - var result = []; - for (var key in obj) { - result.push({ "key": key, "value": obj[key].toLowerCase() }); - } - return result; - } - - function convertArrayToObject(keyValueArray) { - var result = {}; - for (var i = 0; i < keyValueArray.length; i++) { - var obj = keyValueArray[i]; - result[obj.key] = obj.value; - } - return result; - } - - Component.onCompleted: { - getActiveProvider() - getRegisteredProviders() - getCurrentWallpaper() - getAutoRotation() - } - - Item { - id: topArea - anchors.left: parent.left - anchors.right: parent.right - anchors.top: parent.top - height: Kirigami.Units.gridUnit * 2 - - Kirigami.Heading { - id: idleSettingPageTextHeading - level: 1 - wrapMode: Text.WordWrap - anchors.centerIn: parent - font.bold: true - text: qsTr("Wallpaper Settings") - color: Kirigami.Theme.textColor - } - } - - ScrollBar { - id: flickAreaScrollBar - anchors.right: parent.right - width: Mycroft.Units.gridUnit - anchors.top: topArea.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.bottom: bottomArea.top - } - - RowLayout { - id: wallpaperProviderSelector - anchors.top: topArea.bottom - anchors.left: parent.left - anchors.right: parent.right - height: Mycroft.Units.gridUnit * 4 - - ComboBox { - id: providersComboBox - Layout.fillWidth: true - Layout.fillHeight: true - textRole: "provider_display_name" - valueRole: "provider_name" - - onModelChanged: { - refreshProvider() - } - - onCurrentValueChanged: { - refreshProvider() - } - } - - Button { - id: setProviderButton - Layout.preferredWidth: Mycroft.Units.gridUnit * 12 - Layout.fillHeight: true - enabled: providersComboBox.currentValue != currentProvider ? 1 : 0 - - background: Rectangle { - radius: 4 - color: setProviderButton.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - } - - contentItem: Item { - RowLayout { - anchors.centerIn: parent - Kirigami.Icon { - Layout.preferredWidth: Kirigami.Units.iconSizes.small - Layout.preferredHeight: Kirigami.Units.iconSizes.small - source: "dialog-ok" - } - Label { - color: setProviderButton.enabled ? Kirigami.Theme.textColor : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - text: qsTr("Set Provider") - } - } - } - - onClicked: { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.set.active.provider", {"provider_name": providersComboBox.currentValue}) - getActiveProvider() - getCurrentWallpaper() - refreshProvider() - } - } - - Button { - id: configureProviderButton - Layout.preferredWidth: Mycroft.Units.gridUnit * 12 - Layout.fillHeight: true - enabled: wallpaperSettings.providerIsConfigurable - - background: Rectangle { - radius: 4 - color: configureProviderButton.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - } - - contentItem: Item { - RowLayout { - anchors.centerIn: parent - Kirigami.Icon { - Layout.preferredWidth: Kirigami.Units.iconSizes.small - Layout.preferredHeight: Kirigami.Units.iconSizes.small - source: "configure" - } - Label { - color: configureProviderButton.enabled ? Kirigami.Theme.textColor : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - text: qsTr("Configure") - } - } - } - - onClicked: { - getProviderConfig() - configureProviderPopupDialog.open() - } - } - } - - Rectangle { - anchors.top: wallpaperProviderSelector.bottom - anchors.topMargin: Kirigami.Units.largeSpacing - anchors.left: parent.left - anchors.right: flickAreaScrollBar.left - anchors.leftMargin: Mycroft.Units.gridUnit - anchors.bottom: bottomArea.top - anchors.bottomMargin: Kirigami.Units.largeSpacing - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.7) - border.color: Kirigami.Theme.backgroundColor - border.width: 1 - radius: 4 - - Rectangle { - id: collectionNotAvailableView - anchors.centerIn: parent - width: parent.width - (Mycroft.Units.gridUnit / 2) - height: Mycroft.Units.gridUnit * 4 - color: Kirigami.Theme.backgroundColor - border.color: Kirigami.Theme.highlightColor - border.width: 1 - visible: !wallpaperSettings.providerHasCollection ? 1 : 0 - enabled: !wallpaperSettings.providerHasCollection ? 1 : 0 - radius: 4 - - Label { - id: collectionNotAvailableViewLabel - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit / 2 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - wrapMode: Text.WordWrap - color: Kirigami.Theme.textColor - text: qsTr("This provider generates new wallpapers dynamically instead of wallpaper collections.") - } - } - - GridView { - id: wallpapersView - anchors.centerIn: parent - width: parent.width - (Mycroft.Units.gridUnit / 2) - height: parent.height - (Mycroft.Units.gridUnit / 2) - ScrollBar.vertical: flickAreaScrollBar - visible: wallpaperSettings.providerHasCollection ? 1 : 0 - enabled: wallpaperSettings.providerHasCollection ? 1 : 0 - cellWidth: width / 4 - cellHeight: cellWidth - Mycroft.Units.gridUnit * 2 - clip: true - model: wallpaperSettings.wallpapersProviderCollection - delegate: ItemDelegate { - width: wallpapersView.cellWidth - height: wallpapersView.cellHeight - padding: 4 - - background: Rectangle { - color: "transparent" - } - - contentItem: Rectangle { - color: Kirigami.Theme.backgroundColor - border.color: currentWallpaper == modelData ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - border.width: 2 - - Image { - id: delegateImage - anchors.fill: parent - anchors.margins: 4 - source: Qt.resolvedUrl(modelData) - } - } - - onClicked: { - if(modelData != currentWallpaper) { - setWallpaperPopupDialog.open(modelData) - } - } - } - } - } - - Item { - id: bottomArea - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: Mycroft.Units.gridUnit * 6 - - Kirigami.Separator { - id: areaSep - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - color: Kirigami.Theme.highlightColor - height: 2 - } - - RowLayout { - anchors.fill: parent - - Kirigami.Icon { - id: backIcon - source: Qt.resolvedUrl("images/back.svg") - Layout.preferredHeight: Kirigami.Units.iconSizes.medium - Layout.preferredWidth: Kirigami.Units.iconSizes.medium - - ColorOverlay { - anchors.fill: parent - source: backIcon - color: Kirigami.Theme.textColor - } - } - - Kirigami.Heading { - level: 2 - wrapMode: Text.WordWrap - font.bold: true - text: qsTr("Device Settings") - color: Kirigami.Theme.textColor - verticalAlignment: Text.AlignVCenter - Layout.fillWidth: true - Layout.preferredHeight: Kirigami.Units.gridUnit * 2 - } - } - - MouseArea { - anchors.fill: parent - onClicked: { - triggerGuiEvent("mycroft.device.settings", {}) - Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("../../snd/clicked.wav")) - } - } - } - - ItemDelegate { - id: setWallpaperPopupDialog - width: wallpaperSettings.width - height: wallpaperSettings.height - property bool opened: false - visible: setWallpaperPopupDialog.opened ? 1 : 0 - enabled: setWallpaperPopupDialog.opened ? 1 : 0 - property var imageUrl - - function open(url) { - setWallpaperPopupDialog.imageUrl = url - setWallpaperPopupDialog.opened = true - } - - function close() { - setWallpaperPopupDialog.opened = false - } - - background: Item { - - Image { - id: bgModelImage - anchors.fill: parent - anchors.margins: Mycroft.Units.gridUnit * 2 - source: Qt.resolvedUrl(setWallpaperPopupDialog.imageUrl) - smooth: true - } - - Rectangle { - anchors.fill: parent - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.6) - } - } - - contentItem: Item { - width: wallpaperSettings.width - height: wallpaperSettings.height - - Item { - anchors.centerIn: parent - width: parent.width / 1.5 - height: parent.height / 1.5 - - Column { - anchors.fill: parent - spacing: Mycroft.Units.gridUnit / 2 - - RowLayout { - id: warningMessageWallpaperRotation - width: parent.width - height: Mycroft.Units.gridUnit * 4 - enabled: wallpaperSettings.wallpaperRotation - visible: wallpaperSettings.wallpaperRotation - - Kirigami.Icon { - Layout.preferredWidth: Kirigami.Units.iconSizes.small - Layout.preferredHeight: Kirigami.Units.iconSizes.small - Layout.alignment: Layout.AlignVCenter - source: "state-warning" - } - - Label { - Layout.fillWidth: true - Layout.fillHeight: true - color: Kirigami.Theme.textColor - font.bold: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - maximumLineCount: 3 - elide: Text.ElideRight - text: qsTr("Wallpaper rotation prevents setting new wallpapers, disable wallpaper rotation and try again") - } - } - - Button { - id: setWallpaperButton - width: parent.width - height: Mycroft.Units.gridUnit * 3 - enabled: wallpaperSettings.wallpaperRotation ? 0 : 1 - - background: Rectangle { - radius: 4 - color: setWallpaperButton.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - } - - contentItem: Item { - RowLayout { - anchors.centerIn: parent - Kirigami.Icon { - Layout.preferredWidth: Kirigami.Units.iconSizes.small - Layout.preferredHeight: Kirigami.Units.iconSizes.small - source: "dialog-ok" - } - Label { - color: setWallpaperButton.enabled ? Kirigami.Theme.textColor : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - text: qsTr("Set Wallpaper") - } - } - } - - onClicked: { - if(currentProvider == providersComboBox.currentValue) { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.set.wallpaper", {"url": setWallpaperPopupDialog.imageUrl}) - setWallpaperPopupDialog.close() - getCurrentWallpaper() - } else { - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.set.active.provider", {"provider_name": providersComboBox.currentValue, "provider_image": setWallpaperPopupDialog.imageUrl}) - getActiveProvider() - getCurrentWallpaper() - refreshProvider() - } - } - - Keys.onReturnPressed: { - clicked() - } - - } - - Button { - id: rejectButton - width: parent.width - height: Mycroft.Units.gridUnit * 3 - - background: Rectangle { - radius: 4 - color: rejectButton.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - } - - contentItem: Item { - RowLayout { - anchors.centerIn: parent - Kirigami.Icon { - Layout.preferredWidth: Kirigami.Units.iconSizes.small - Layout.preferredHeight: Kirigami.Units.iconSizes.small - source: "dialog-cancel" - } - Label { - color: Kirigami.Theme.textColor - text: qsTr("Cancel") - } - } - } - - onClicked: { - setWallpaperPopupDialog.close() - } - - Keys.onReturnPressed: { - clicked() - } - } - } - } - } - } - - ItemDelegate { - id: configureProviderPopupDialog - width: wallpaperSettings.width - height: wallpaperSettings.height - property bool opened: false - visible: configureProviderPopupDialog.opened ? 1 : 0 - enabled: configureProviderPopupDialog.opened ? 1 : 0 - property var providerName - property var providerConfiguration - property var newConfiguration: [] - - function open() { - configureProviderPopupDialog.opened = true - } - - function close() { - providerConfiguration = {} - configureProviderPopupDialog.opened = false - } - - background: Rectangle { - color: Qt.rgba(Kirigami.Theme.backgroundColor.r, Kirigami.Theme.backgroundColor.g, Kirigami.Theme.backgroundColor.b, 0.6) - } - - contentItem: Item { - width: wallpaperSettings.width - height: wallpaperSettings.height - - Item { - anchors.centerIn: parent - width: parent.width / 1.5 - height: parent.height / 1.5 - - Column { - anchors.fill: parent - spacing: Mycroft.Units.gridUnit / 2 - - Repeater { - model: configureProviderPopupDialog.providerConfiguration - delegate: RowLayout { - width: parent.width - height: Mycroft.Units.gridUnit * 3 - - Label { - Layout.fillWidth: true - Layout.fillHeight: true - color: Kirigami.Theme.textColor - font.capitalization: Font.AllUppercase - text: modelData.key - } - - TextField { - Layout.fillWidth: true - Layout.fillHeight: true - text: modelData.value - - onTextChanged: { - var keyExists = false - for (var i = 0; i < configureProviderPopupDialog.newConfiguration.length; i++) { - if (configureProviderPopupDialog.newConfiguration[i].key === modelData.key) { - configureProviderPopupDialog.newConfiguration[i].value = text - keyExists = true - } - } - if (!keyExists) { - configureProviderPopupDialog.newConfiguration.push({ - "key": modelData.key, - "value": text - }) - } - } - } - } - } - - Button { - id: setProviderConfigurationButton - width: parent.width - height: Mycroft.Units.gridUnit * 3 - - background: Rectangle { - radius: 4 - color: setProviderConfigurationButton.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - } - - contentItem: Item { - RowLayout { - anchors.centerIn: parent - Kirigami.Icon { - Layout.preferredWidth: Kirigami.Units.iconSizes.small - Layout.preferredHeight: Kirigami.Units.iconSizes.small - source: "dialog-ok" - } - Label { - color: setWallpaperButton.enabled ? Kirigami.Theme.textColor : Qt.rgba(Kirigami.Theme.textColor.r, Kirigami.Theme.textColor.g, Kirigami.Theme.textColor.b, 0.5) - text: qsTr("Apply Configuration") - } - } - } - - onClicked: { - var config = convertArrayToObject(configureProviderPopupDialog.newConfiguration) - Mycroft.MycroftController.sendRequest("ovos.wallpaper.manager.set.provider.config", - {"provider_name": configureProviderPopupDialog.providerName, "config": config}) - configureProviderPopupDialog.close() - } - - Keys.onReturnPressed: { - clicked() - } - } - - Button { - id: rejectConfigurationButton - width: parent.width - height: Mycroft.Units.gridUnit * 3 - - background: Rectangle { - radius: 4 - color: rejectConfigurationButton.activeFocus ? Kirigami.Theme.highlightColor : Kirigami.Theme.backgroundColor - } - - contentItem: Item { - RowLayout { - anchors.centerIn: parent - Kirigami.Icon { - Layout.preferredWidth: Kirigami.Units.iconSizes.small - Layout.preferredHeight: Kirigami.Units.iconSizes.small - source: "dialog-cancel" - } - Label { - color: Kirigami.Theme.textColor - text: qsTr("Cancel") - } - } - } - - onClicked: { - configureProviderPopupDialog.close() - } - - Keys.onReturnPressed: { - clicked() - } - } - } - } - } - } -} diff --git a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_de.qm b/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_de.qm deleted file mode 100644 index 40b5b63dc33d..000000000000 Binary files a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_de.qm and /dev/null differ diff --git a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_es.qm b/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_es.qm deleted file mode 100644 index f690c6d15e5c..000000000000 Binary files a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_es.qm and /dev/null differ diff --git a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_fr.qm b/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_fr.qm deleted file mode 100644 index 51418740d73b..000000000000 Binary files a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_fr.qm and /dev/null differ diff --git a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_it.qm b/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_it.qm deleted file mode 100644 index 695109a1d026..000000000000 Binary files a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_it.qm and /dev/null differ diff --git a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_nl.qm b/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_nl.qm deleted file mode 100644 index cb5f1beafc12..000000000000 Binary files a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_nl.qm and /dev/null differ diff --git a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_pt.qm b/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_pt.qm deleted file mode 100644 index b1e9ceb76aec..000000000000 Binary files a/mycroft/res/ui/translations/SmartSpeakerExtension.GuiInterface_pt.qm and /dev/null differ diff --git a/mycroft/res/ui/translations/about_page_de.ts b/mycroft/res/ui/translations/about_page_de.ts deleted file mode 100644 index 779f3b4206e1..000000000000 --- a/mycroft/res/ui/translations/about_page_de.ts +++ /dev/null @@ -1,43 +0,0 @@ - - - - - about_page - - - About - Über - - - - System Information - Systeminfo - - - - Kernel Version - Kernel Version - - - - Version - Version - - - - - Local Address - Lokale Adresse - - - - No Active Connection - Keine aktive Verbindung - - - - Device Settings - Geräteeinstellungen - - - diff --git a/mycroft/res/ui/translations/about_page_es.ts b/mycroft/res/ui/translations/about_page_es.ts deleted file mode 100644 index 2b78dc42c732..000000000000 --- a/mycroft/res/ui/translations/about_page_es.ts +++ /dev/null @@ -1,43 +0,0 @@ - - - - - about_page - - - About - Sobre - - - - System Information - Información del sistema - - - - Kernel Version - Versión del núcleo - - - - Version - Versión - - - - - Local Address - Dirección local - - - - No Active Connection - Sin conexión activa - - - - Device Settings - Configuración de dispositivo - - - diff --git a/mycroft/res/ui/translations/about_page_fr.ts b/mycroft/res/ui/translations/about_page_fr.ts deleted file mode 100644 index 91956a951ae4..000000000000 --- a/mycroft/res/ui/translations/about_page_fr.ts +++ /dev/null @@ -1,43 +0,0 @@ - - - - - about_page - - - About - À propos de - - - - System Information - Informations système - - - - Kernel Version - Version du noyau - - - - Version - Version - - - - - Local Address - Adresse locale - - - - No Active Connection - Aucune connexion active - - - - Device Settings - Réglages de l'appareil - - - diff --git a/mycroft/res/ui/translations/about_page_it.ts b/mycroft/res/ui/translations/about_page_it.ts deleted file mode 100644 index cd62d6ee4723..000000000000 --- a/mycroft/res/ui/translations/about_page_it.ts +++ /dev/null @@ -1,43 +0,0 @@ - - - - - about_page - - - About - Di - - - - System Information - Informazioni di sistema - - - - Kernel Version - Versione kernel - - - - Version - Versione - - - - - Local Address - Indirizzo locale - - - - No Active Connection - Nessuna connessione attiva - - - - Device Settings - Impostazioni dispositivo - - - diff --git a/mycroft/res/ui/translations/about_page_nl.ts b/mycroft/res/ui/translations/about_page_nl.ts deleted file mode 100644 index fb40fecbc565..000000000000 --- a/mycroft/res/ui/translations/about_page_nl.ts +++ /dev/null @@ -1,43 +0,0 @@ - - - - - about_page - - - About - Over - - - - System Information - Systeeminformatie - - - - Kernel Version - Kernelversie - - - - Version - Versie - - - - - Local Address - Lokaal adres - - - - No Active Connection - Geen actieve verbinding - - - - Device Settings - Apparaat instellingen - - - diff --git a/mycroft/res/ui/translations/about_page_pt.ts b/mycroft/res/ui/translations/about_page_pt.ts deleted file mode 100644 index d9c0cd443fca..000000000000 --- a/mycroft/res/ui/translations/about_page_pt.ts +++ /dev/null @@ -1,43 +0,0 @@ - - - - - about_page - - - About - Sobre - - - - System Information - Informação do sistema - - - - Kernel Version - Versão do kernel - - - - Version - Versão - - - - - Local Address - Endereço local - - - - No Active Connection - Sem conexão ativa - - - - Device Settings - Configurações do dispositivo - - - diff --git a/mycroft/res/ui/translations/configuration_generator_display_de.ts b/mycroft/res/ui/translations/configuration_generator_display_de.ts deleted file mode 100644 index 12096203523f..000000000000 --- a/mycroft/res/ui/translations/configuration_generator_display_de.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - configuration_generator_display - - - Configuration - Konfiguration - - - - Back - Zurück - - - - Update Settings - Update Einstellungen - - - diff --git a/mycroft/res/ui/translations/configuration_generator_display_es.ts b/mycroft/res/ui/translations/configuration_generator_display_es.ts deleted file mode 100644 index f9f1745f40ad..000000000000 --- a/mycroft/res/ui/translations/configuration_generator_display_es.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - configuration_generator_display - - - Configuration - Configuración - - - - Back - atrás - - - - Update Settings - Ajustes de actualización - - - diff --git a/mycroft/res/ui/translations/configuration_generator_display_fr.ts b/mycroft/res/ui/translations/configuration_generator_display_fr.ts deleted file mode 100644 index 4957b0ab513a..000000000000 --- a/mycroft/res/ui/translations/configuration_generator_display_fr.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - configuration_generator_display - - - Configuration - Configuration - - - - Back - Retour - - - - Update Settings - Mettre à jour les paramètres - - - diff --git a/mycroft/res/ui/translations/configuration_generator_display_it.ts b/mycroft/res/ui/translations/configuration_generator_display_it.ts deleted file mode 100644 index 910f6de032fe..000000000000 --- a/mycroft/res/ui/translations/configuration_generator_display_it.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - configuration_generator_display - - - Configuration - Configurazione - - - - Back - Di ritorno - - - - Update Settings - Aggiorna impostazioni - - - diff --git a/mycroft/res/ui/translations/configuration_generator_display_nl.ts b/mycroft/res/ui/translations/configuration_generator_display_nl.ts deleted file mode 100644 index 4491e71190d6..000000000000 --- a/mycroft/res/ui/translations/configuration_generator_display_nl.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - configuration_generator_display - - - Configuration - Configuratie - - - - Back - Rug - - - - Update Settings - Update-instellingen - - - diff --git a/mycroft/res/ui/translations/configuration_generator_display_pt.ts b/mycroft/res/ui/translations/configuration_generator_display_pt.ts deleted file mode 100644 index 3aec04ff2ed8..000000000000 --- a/mycroft/res/ui/translations/configuration_generator_display_pt.ts +++ /dev/null @@ -1,22 +0,0 @@ - - - - - configuration_generator_display - - - Configuration - Configuração - - - - Back - De volta - - - - Update Settings - Atualizar configurações - - - diff --git a/mycroft/res/ui/translations/configuration_groups_display_de.ts b/mycroft/res/ui/translations/configuration_groups_display_de.ts deleted file mode 100644 index 9013e0ad3473..000000000000 --- a/mycroft/res/ui/translations/configuration_groups_display_de.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - configuration_groups_display - - - Advanced Configuration - Erweiterte Konfiguration - - - - Back - Zurück - - - diff --git a/mycroft/res/ui/translations/configuration_groups_display_es.ts b/mycroft/res/ui/translations/configuration_groups_display_es.ts deleted file mode 100644 index 7ed7ac74141f..000000000000 --- a/mycroft/res/ui/translations/configuration_groups_display_es.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - configuration_groups_display - - - Advanced Configuration - Configuración avanzada - - - - Back - atrás - - - diff --git a/mycroft/res/ui/translations/configuration_groups_display_fr.ts b/mycroft/res/ui/translations/configuration_groups_display_fr.ts deleted file mode 100644 index e45fdb16db64..000000000000 --- a/mycroft/res/ui/translations/configuration_groups_display_fr.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - configuration_groups_display - - - Advanced Configuration - Réglages avancés - - - - Back - Retour - - - diff --git a/mycroft/res/ui/translations/configuration_groups_display_it.ts b/mycroft/res/ui/translations/configuration_groups_display_it.ts deleted file mode 100644 index 5731cc1b9384..000000000000 --- a/mycroft/res/ui/translations/configuration_groups_display_it.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - configuration_groups_display - - - Advanced Configuration - Configurazione avanzata - - - - Back - Di ritorno - - - diff --git a/mycroft/res/ui/translations/configuration_groups_display_nl.ts b/mycroft/res/ui/translations/configuration_groups_display_nl.ts deleted file mode 100644 index 79d41f25f4c3..000000000000 --- a/mycroft/res/ui/translations/configuration_groups_display_nl.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - configuration_groups_display - - - Advanced Configuration - Geavanceerde configuratie - - - - Back - Rug - - - diff --git a/mycroft/res/ui/translations/configuration_groups_display_pt.ts b/mycroft/res/ui/translations/configuration_groups_display_pt.ts deleted file mode 100644 index 36aa6d01e3dd..000000000000 --- a/mycroft/res/ui/translations/configuration_groups_display_pt.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - configuration_groups_display - - - Advanced Configuration - Configuração avançada - - - - Back - De volta - - - diff --git a/mycroft/res/ui/translations/customize_settings_de.ts b/mycroft/res/ui/translations/customize_settings_de.ts deleted file mode 100644 index ae170dddb4fb..000000000000 --- a/mycroft/res/ui/translations/customize_settings_de.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - customize_settings - - - Customize Settings - Einstellungen anpassen - - - - Device Settings - Geräteeinstellungen - - - - Create Scheme - Schema erstellen - - - - Select Style - Stilauswahl - - - - Cancel - Abbrechen - - - diff --git a/mycroft/res/ui/translations/customize_settings_es.ts b/mycroft/res/ui/translations/customize_settings_es.ts deleted file mode 100644 index 200eea756d4a..000000000000 --- a/mycroft/res/ui/translations/customize_settings_es.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - customize_settings - - - Customize Settings - Personalizar la configuración - - - - Device Settings - Configuración de dispositivo - - - - Create Scheme - Crear esquema - - - - Select Style - Seleccionar estilo - - - - Cancel - Cancelar - - - diff --git a/mycroft/res/ui/translations/customize_settings_fr.ts b/mycroft/res/ui/translations/customize_settings_fr.ts deleted file mode 100644 index 7c6443f2062f..000000000000 --- a/mycroft/res/ui/translations/customize_settings_fr.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - customize_settings - - - Customize Settings - Personnaliser les paramètres - - - - Device Settings - Réglages de l'appareil - - - - Create Scheme - Créer un schéma - - - - Select Style - Sélectionnez Style - - - - Cancel - Annuler - - - diff --git a/mycroft/res/ui/translations/customize_settings_it.ts b/mycroft/res/ui/translations/customize_settings_it.ts deleted file mode 100644 index 2422bdf6ed6f..000000000000 --- a/mycroft/res/ui/translations/customize_settings_it.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - customize_settings - - - Customize Settings - Personalizza le impostazioni - - - - Device Settings - Impostazioni dispositivo - - - - Create Scheme - Crea schema - - - - Select Style - Seleziona Stile - - - - Cancel - Annulla - - - diff --git a/mycroft/res/ui/translations/customize_settings_nl.ts b/mycroft/res/ui/translations/customize_settings_nl.ts deleted file mode 100644 index 046d15bf1730..000000000000 --- a/mycroft/res/ui/translations/customize_settings_nl.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - customize_settings - - - Customize Settings - Instellingen aanpassen - - - - Device Settings - Apparaat instellingen - - - - Create Scheme - Schema maken - - - - Select Style - Selecteer stijl - - - - Cancel - Annuleren - - - diff --git a/mycroft/res/ui/translations/customize_settings_pt.ts b/mycroft/res/ui/translations/customize_settings_pt.ts deleted file mode 100644 index a9ca5a19faa5..000000000000 --- a/mycroft/res/ui/translations/customize_settings_pt.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - customize_settings - - - Customize Settings - Personalizar configurações - - - - Device Settings - Configurações do dispositivo - - - - Create Scheme - Criar esquema - - - - Select Style - Selecionar estilo - - - - Cancel - Cancelar - - - diff --git a/mycroft/res/ui/translations/customize_theme_de.ts b/mycroft/res/ui/translations/customize_theme_de.ts deleted file mode 100644 index ff56825f9adb..000000000000 --- a/mycroft/res/ui/translations/customize_theme_de.ts +++ /dev/null @@ -1,58 +0,0 @@ - - - - - customize_theme - - - Example Scheme - Beispielschema - - - - Create Scheme - Schema erstellen - - - - Select Primary Color - Wähle Primärfarbe - - - - Select Secondary Color - Wähle Sekundärfarbe - - - - Auto Text Color - Automatische Textfarbe - - - - Set Name - Name - - - - - Preview - Vorschau - - - - Create - Erstellen - - - - Back - Zurück - - - - Cancel - Abbrechen - - - diff --git a/mycroft/res/ui/translations/customize_theme_es.ts b/mycroft/res/ui/translations/customize_theme_es.ts deleted file mode 100644 index f445e39a0e45..000000000000 --- a/mycroft/res/ui/translations/customize_theme_es.ts +++ /dev/null @@ -1,58 +0,0 @@ - - - - - customize_theme - - - Example Scheme - Esquema de ejemplo - - - - Create Scheme - Crear esquema - - - - Select Primary Color - Seleccionar color primario - - - - Select Secondary Color - Seleccionar color secundario - - - - Auto Text Color - Color de texto automático - - - - Set Name - Escoger un nombre - - - - - Preview - Avance - - - - Create - Crear - - - - Back - atrás - - - - Cancel - Cancelar - - - diff --git a/mycroft/res/ui/translations/customize_theme_fr.ts b/mycroft/res/ui/translations/customize_theme_fr.ts deleted file mode 100644 index e3914dd6ade7..000000000000 --- a/mycroft/res/ui/translations/customize_theme_fr.ts +++ /dev/null @@ -1,58 +0,0 @@ - - - - - customize_theme - - - Example Scheme - Exemple de schéma - - - - Create Scheme - Créer un schéma - - - - Select Primary Color - Sélectionnez la couleur primaire - - - - Select Secondary Color - Sélectionnez la couleur secondaire - - - - Auto Text Color - Couleur du texte automatique - - - - Set Name - Définir le nom - - - - - Preview - Aperçu - - - - Create - Créer - - - - Back - Retour - - - - Cancel - Annuler - - - diff --git a/mycroft/res/ui/translations/customize_theme_it.ts b/mycroft/res/ui/translations/customize_theme_it.ts deleted file mode 100644 index 208b390943af..000000000000 --- a/mycroft/res/ui/translations/customize_theme_it.ts +++ /dev/null @@ -1,58 +0,0 @@ - - - - - customize_theme - - - Example Scheme - Schema di esempio - - - - Create Scheme - Crea schema - - - - Select Primary Color - Seleziona Colore primario - - - - Select Secondary Color - Seleziona Colore secondario - - - - Auto Text Color - Colore testo automatico - - - - Set Name - Imposta nome - - - - - Preview - Anteprima - - - - Create - Creare - - - - Back - Di ritorno - - - - Cancel - Annulla - - - diff --git a/mycroft/res/ui/translations/customize_theme_nl.ts b/mycroft/res/ui/translations/customize_theme_nl.ts deleted file mode 100644 index 0522c54e55f4..000000000000 --- a/mycroft/res/ui/translations/customize_theme_nl.ts +++ /dev/null @@ -1,58 +0,0 @@ - - - - - customize_theme - - - Example Scheme - Voorbeeldschema - - - - Create Scheme - Schema maken - - - - Select Primary Color - Selecteer primaire kleur - - - - Select Secondary Color - Selecteer secundaire kleur - - - - Auto Text Color - Automatische tekstkleur - - - - Set Name - Naam instellen - - - - - Preview - Voorbeeld - - - - Create - Creëren - - - - Back - Rug - - - - Cancel - Annuleren - - - diff --git a/mycroft/res/ui/translations/customize_theme_pt.ts b/mycroft/res/ui/translations/customize_theme_pt.ts deleted file mode 100644 index c08b723ceba5..000000000000 --- a/mycroft/res/ui/translations/customize_theme_pt.ts +++ /dev/null @@ -1,58 +0,0 @@ - - - - - customize_theme - - - Example Scheme - Esquema de Exemplo - - - - Create Scheme - Criar esquema - - - - Select Primary Color - Selecione a cor primária - - - - Select Secondary Color - Selecione a cor secundária - - - - Auto Text Color - Cor do texto automático - - - - Set Name - Nome do conjunto - - - - - Preview - Visualizar - - - - Create - Crio - - - - Back - De volta - - - - Cancel - Cancelar - - - diff --git a/mycroft/res/ui/translations/developer_settings_de.ts b/mycroft/res/ui/translations/developer_settings_de.ts deleted file mode 100644 index 90b68bdccdfa..000000000000 --- a/mycroft/res/ui/translations/developer_settings_de.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - developer_settings - - - Developer Settings - Entwicklereinstellungen - - - - Advanced Settings - Erweiterte Einstellungen - - - - Enable Dashboard - Dashboard aktivieren - - - - Disable Dashboard - Dashboard deaktivieren - - - - Dashboard Address - Dashboard Adresse - - - - Dashboard Username - Dashboard Benutzername - - - - Dashboard Password - Dashboard Passwort - - - - Device Settings - Geräteeinstellungen - - - diff --git a/mycroft/res/ui/translations/developer_settings_es.ts b/mycroft/res/ui/translations/developer_settings_es.ts deleted file mode 100644 index 0616f88a4480..000000000000 --- a/mycroft/res/ui/translations/developer_settings_es.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - developer_settings - - - Developer Settings - Configuración del desarrollador - - - - Advanced Settings - Ajustes avanzados - - - - Enable Dashboard - Habilitar panel - - - - Disable Dashboard - Deshabilitar panel - - - - Dashboard Address - Dirección del tablero - - - - Dashboard Username - Nombre de usuario del panel - - - - Dashboard Password - Contraseña del panel - - - - Device Settings - Configuración de dispositivo - - - diff --git a/mycroft/res/ui/translations/developer_settings_fr.ts b/mycroft/res/ui/translations/developer_settings_fr.ts deleted file mode 100644 index 0726b22bf007..000000000000 --- a/mycroft/res/ui/translations/developer_settings_fr.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - developer_settings - - - Developer Settings - Paramètres du développeur - - - - Advanced Settings - Réglages avancés - - - - Enable Dashboard - Activer le tableau de bord - - - - Disable Dashboard - Désactiver le tableau de bord - - - - Dashboard Address - Adresse du tableau de bord - - - - Dashboard Username - Nom d'utilisateur du tableau de bord - - - - Dashboard Password - Mot de passe du tableau de bord - - - - Device Settings - Réglages de l'appareil - - - diff --git a/mycroft/res/ui/translations/developer_settings_it.ts b/mycroft/res/ui/translations/developer_settings_it.ts deleted file mode 100644 index 5a1047889a45..000000000000 --- a/mycroft/res/ui/translations/developer_settings_it.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - developer_settings - - - Developer Settings - Paramètres du développeur - - - - Advanced Settings - Impostazioni avanzate - - - - Enable Dashboard - Abilita dashboard - - - - Disable Dashboard - Disabilita dashboard - - - - Dashboard Address - Indirizzo dashboard - - - - Dashboard Username - Nome utente dashboard - - - - Dashboard Password - Password dashboard - - - - Device Settings - Impostazioni dispositivo - - - diff --git a/mycroft/res/ui/translations/developer_settings_nl.ts b/mycroft/res/ui/translations/developer_settings_nl.ts deleted file mode 100644 index 9bbe47619719..000000000000 --- a/mycroft/res/ui/translations/developer_settings_nl.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - developer_settings - - - Developer Settings - Ontwikkelaarsinstellingen - - - - Advanced Settings - Geavanceerde instellingen - - - - Enable Dashboard - Dashboard inschakelen - - - - Disable Dashboard - Dashboard uitschakelen - - - - Dashboard Address - Dashboardadres - - - - Dashboard Username - Dashboard-gebruikersnaam - - - - Dashboard Password - Dashboardwachtwoord - - - - Device Settings - Apparaat instellingen - - - diff --git a/mycroft/res/ui/translations/developer_settings_pt.ts b/mycroft/res/ui/translations/developer_settings_pt.ts deleted file mode 100644 index 69f5d68c5e37..000000000000 --- a/mycroft/res/ui/translations/developer_settings_pt.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - developer_settings - - - Developer Settings - Configurações do desenvolvedor - - - - Advanced Settings - Configurações avançadas - - - - Enable Dashboard - Ativar painel - - - - Disable Dashboard - Desativar painel - - - - Dashboard Address - Endereço do painel - - - - Dashboard Username - Nome de usuário do painel - - - - Dashboard Password - Senha do painel - - - - Device Settings - Configurações do dispositivo - - - diff --git a/mycroft/res/ui/translations/display_settings_de.ts b/mycroft/res/ui/translations/display_settings_de.ts deleted file mode 100644 index 5ca29bc234b8..000000000000 --- a/mycroft/res/ui/translations/display_settings_de.ts +++ /dev/null @@ -1,61 +0,0 @@ - - - - - display_settings - - - Display Settings - Bildschirmeinstellungen - - - - Wallpaper Rotation - Hintergrundrotation - - - - Changes the wallpaper automatically - Ändert das Hintergrundbild automatisch - - - - - - ON - AN - - - - - - OFF - AUS - - - - Auto Dim - automatisch dimmen - - - - Dim's the display in 60 seconds - Dimme das Display in 60 Sekunden - - - - Auto Nightmode - Automatischer Nachtmodus - - - - Activates nightmode on homescreen, depending on the time of the day - Aktiviert den Nachtmodus auf dem Homescreen, abhängig von der Tageszeit - - - - Device Settings - Geräteeinstellungen - - - diff --git a/mycroft/res/ui/translations/display_settings_es.ts b/mycroft/res/ui/translations/display_settings_es.ts deleted file mode 100644 index e0f264309293..000000000000 --- a/mycroft/res/ui/translations/display_settings_es.ts +++ /dev/null @@ -1,61 +0,0 @@ - - - - - display_settings - - - Display Settings - Configuración de pantalla - - - - Wallpaper Rotation - Rotación de papel tapiz - - - - Changes the wallpaper automatically - Cambia el fondo de pantalla automáticamente - - - - - - ON - EN - - - - - - OFF - APAGADO - - - - Auto Dim - Atenuación automática - - - - Dim's the display in 60 seconds - Oscurece la pantalla en 60 segundos - - - - Auto Nightmode - Modo nocturno automático - - - - Activates nightmode on homescreen, depending on the time of the day - Activa el modo nocturno en la pantalla de inicio, según la hora del día - - - - Device Settings - Configuración de dispositivo - - - diff --git a/mycroft/res/ui/translations/display_settings_fr.ts b/mycroft/res/ui/translations/display_settings_fr.ts deleted file mode 100644 index d423ea0c32ca..000000000000 --- a/mycroft/res/ui/translations/display_settings_fr.ts +++ /dev/null @@ -1,61 +0,0 @@ - - - - - display_settings - - - Display Settings - Paramètres d'affichage - - - - Wallpaper Rotation - Rotation du papier peint - - - - Changes the wallpaper automatically - Change automatiquement le fond d'écran - - - - - - ON - SUR - - - - - - OFF - À L'ARRÊT - - - - Auto Dim - Atténuation automatique - - - - Dim's the display in 60 seconds - Estompe l'affichage en 60 secondes - - - - Auto Nightmode - Mode nuit automatique - - - - Activates nightmode on homescreen, depending on the time of the day - Active le mode nuit sur l'écran d'accueil, en fonction de l'heure de la journée - - - - Device Settings - Réglages de l'appareil - - - diff --git a/mycroft/res/ui/translations/display_settings_it.ts b/mycroft/res/ui/translations/display_settings_it.ts deleted file mode 100644 index d759b5f47500..000000000000 --- a/mycroft/res/ui/translations/display_settings_it.ts +++ /dev/null @@ -1,61 +0,0 @@ - - - - - display_settings - - - Display Settings - Impostazioni di visualizzazione - - - - Wallpaper Rotation - Rotazione dello sfondo - - - - Changes the wallpaper automatically - Cambia automaticamente lo sfondo - - - - - - ON - SU - - - - - - OFF - SPENTO - - - - Auto Dim - Oscuramento automatico - - - - Dim's the display in 60 seconds - Oscuramento automatico - - - - Auto Nightmode - Oscuramento automatico - - - - Activates nightmode on homescreen, depending on the time of the day - Attiva la modalità notturna sulla schermata iniziale, a seconda dell'ora del giorno - - - - Device Settings - Impostazioni dispositivo - - - diff --git a/mycroft/res/ui/translations/display_settings_nl.ts b/mycroft/res/ui/translations/display_settings_nl.ts deleted file mode 100644 index 6df0453aef4f..000000000000 --- a/mycroft/res/ui/translations/display_settings_nl.ts +++ /dev/null @@ -1,61 +0,0 @@ - - - - - display_settings - - - Display Settings - Scherminstellingen - - - - Wallpaper Rotation - Achtergrondrotatie - - - - Changes the wallpaper automatically - Verandert de achtergrond automatisch - - - - - - ON - AAN - - - - - - OFF - UIT - - - - Auto Dim - Automatisch dimmen - - - - Dim's the display in 60 seconds - Dim het display in 60 seconden - - - - Auto Nightmode - Automatische nachtmodus - - - - Activates nightmode on homescreen, depending on the time of the day - Activeert de nachtmodus op het startscherm, afhankelijk van het tijdstip van de dag - - - - Device Settings - Apparaat instellingen - - - diff --git a/mycroft/res/ui/translations/display_settings_pt.ts b/mycroft/res/ui/translations/display_settings_pt.ts deleted file mode 100644 index f0e31adea144..000000000000 --- a/mycroft/res/ui/translations/display_settings_pt.ts +++ /dev/null @@ -1,61 +0,0 @@ - - - - - display_settings - - - Display Settings - Configurações do visor - - - - Wallpaper Rotation - Rotação do papel de parede - - - - Changes the wallpaper automatically - Muda o papel de parede automaticamente - - - - - - ON - SOBRE - - - - - - OFF - DESLIGADO - - - - Auto Dim - ESCURECIMENTO AUTOMÁTICO - - - - Dim's the display in 60 seconds - Escureça a tela em 60 segundos - - - - Auto Nightmode - Modo noturno automático - - - - Activates nightmode on homescreen, depending on the time of the day - Ativa o modo noturno na tela inicial, dependendo da hora do dia - - - - Device Settings - Configurações do dispositivo - - - diff --git a/mycroft/res/ui/translations/homescreen_settings_de.ts b/mycroft/res/ui/translations/homescreen_settings_de.ts deleted file mode 100644 index 4294b90da81f..000000000000 --- a/mycroft/res/ui/translations/homescreen_settings_de.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - homescreen_settings - - - Homescreen Settings - Einstellungen Homescreen - - - - Device Settings - Geräteeinstellungen - - - diff --git a/mycroft/res/ui/translations/homescreen_settings_es.ts b/mycroft/res/ui/translations/homescreen_settings_es.ts deleted file mode 100644 index 7fced8c8acc6..000000000000 --- a/mycroft/res/ui/translations/homescreen_settings_es.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - homescreen_settings - - - Homescreen Settings - Configuración de la pantalla de inicio - - - - Device Settings - Configuración de dispositivo - - - diff --git a/mycroft/res/ui/translations/homescreen_settings_fr.ts b/mycroft/res/ui/translations/homescreen_settings_fr.ts deleted file mode 100644 index ada9f4fdbc05..000000000000 --- a/mycroft/res/ui/translations/homescreen_settings_fr.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - homescreen_settings - - - Homescreen Settings - Paramètres de l'écran d'accueil - - - - Device Settings - Réglages de l'appareil - - - diff --git a/mycroft/res/ui/translations/homescreen_settings_it.ts b/mycroft/res/ui/translations/homescreen_settings_it.ts deleted file mode 100644 index 4059dbf51e33..000000000000 --- a/mycroft/res/ui/translations/homescreen_settings_it.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - homescreen_settings - - - Homescreen Settings - Impostazioni della schermata iniziale - - - - Device Settings - Impostazioni dispositivo - - - diff --git a/mycroft/res/ui/translations/homescreen_settings_nl.ts b/mycroft/res/ui/translations/homescreen_settings_nl.ts deleted file mode 100644 index 9c82f322bb32..000000000000 --- a/mycroft/res/ui/translations/homescreen_settings_nl.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - homescreen_settings - - - Homescreen Settings - Instellingen startscherm - - - - Device Settings - Apparaat instellingen - - - diff --git a/mycroft/res/ui/translations/homescreen_settings_pt.ts b/mycroft/res/ui/translations/homescreen_settings_pt.ts deleted file mode 100644 index dbf10db2f5fd..000000000000 --- a/mycroft/res/ui/translations/homescreen_settings_pt.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - homescreen_settings - - - Homescreen Settings - Configurações da tela inicial - - - - Device Settings - Configurações do dispositivo - - - diff --git a/mycroft/res/ui/translations/lrelease-generator.sh b/mycroft/res/ui/translations/lrelease-generator.sh deleted file mode 100755 index 7d1504512651..000000000000 --- a/mycroft/res/ui/translations/lrelease-generator.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -lrelease about_page_de.ts settingspage_de.ts ssh_settings_de.ts homescreen_settings_de.ts configuration_generator_display_de.ts configuration_groups_display_de.ts customize_settings_de.ts customize_theme_de.ts developer_settings_de.ts display_settings_de.ts settingListBox_de.ts -qm SmartSpeakerExtension.GuiInterface_de.qm - -lrelease about_page_es.ts settingspage_es.ts ssh_settings_es.ts homescreen_settings_es.ts configuration_generator_display_es.ts configuration_groups_display_es.ts customize_settings_es.ts customize_theme_es.ts developer_settings_es.ts display_settings_es.ts settingListBox_es.ts -qm SmartSpeakerExtension.GuiInterface_es.qm - -lrelease about_page_nl.ts settingspage_nl.ts ssh_settings_nl.ts homescreen_settings_nl.ts configuration_generator_display_nl.ts configuration_groups_display_nl.ts customize_settings_nl.ts customize_theme_nl.ts developer_settings_nl.ts display_settings_nl.ts settingListBox_nl.ts -qm SmartSpeakerExtension.GuiInterface_nl.qm - -lrelease about_page_fr.ts settingspage_fr.ts ssh_settings_fr.ts homescreen_settings_fr.ts configuration_generator_display_fr.ts configuration_groups_display_fr.ts customize_settings_fr.ts customize_theme_fr.ts developer_settings_fr.ts display_settings_fr.ts settingListBox_fr.ts -qm SmartSpeakerExtension.GuiInterface_fr.qm - -lrelease about_page_pt.ts settingspage_pt.ts ssh_settings_pt.ts homescreen_settings_pt.ts configuration_generator_display_pt.ts configuration_groups_display_pt.ts customize_settings_pt.ts customize_theme_pt.ts developer_settings_pt.ts display_settings_pt.ts settingListBox_pt.ts -qm SmartSpeakerExtension.GuiInterface_pt.qm - -lrelease about_page_it.ts settingspage_it.ts ssh_settings_it.ts homescreen_settings_it.ts configuration_generator_display_it.ts configuration_groups_display_it.ts customize_settings_it.ts customize_theme_it.ts developer_settings_it.ts display_settings_it.ts settingListBox_it.ts -qm SmartSpeakerExtension.GuiInterface_it.qm - diff --git a/mycroft/res/ui/translations/settingListBox_de.ts b/mycroft/res/ui/translations/settingListBox_de.ts deleted file mode 100644 index 5c8619176039..000000000000 --- a/mycroft/res/ui/translations/settingListBox_de.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - settingListBox - - - Type here to add an item to the list - Namen des Elements, das zur Liste hinzugefügt werden soll - - - - Add Item - Element hinzufügen - - - diff --git a/mycroft/res/ui/translations/settingListBox_es.ts b/mycroft/res/ui/translations/settingListBox_es.ts deleted file mode 100644 index 63212903f316..000000000000 --- a/mycroft/res/ui/translations/settingListBox_es.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - settingListBox - - - Type here to add an item to the list - Escriba aquí para agregar un elemento a la lista - - - - Add Item - Añadir artículo - - - diff --git a/mycroft/res/ui/translations/settingListBox_fr.ts b/mycroft/res/ui/translations/settingListBox_fr.ts deleted file mode 100644 index 6d4237dc4ef0..000000000000 --- a/mycroft/res/ui/translations/settingListBox_fr.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - settingListBox - - - Type here to add an item to the list - Tapez ici pour ajouter un élément à la liste - - - - Add Item - Ajouter un item - - - diff --git a/mycroft/res/ui/translations/settingListBox_it.ts b/mycroft/res/ui/translations/settingListBox_it.ts deleted file mode 100644 index eb8786f1ac3a..000000000000 --- a/mycroft/res/ui/translations/settingListBox_it.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - settingListBox - - - Type here to add an item to the list - Digita qui per aggiungere un elemento all'elenco - - - - Add Item - Aggiungi articolo - - - diff --git a/mycroft/res/ui/translations/settingListBox_nl.ts b/mycroft/res/ui/translations/settingListBox_nl.ts deleted file mode 100644 index 3f05d1923930..000000000000 --- a/mycroft/res/ui/translations/settingListBox_nl.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - settingListBox - - - Type here to add an item to the list - Typ hier om een ​​item aan de lijst toe te voegen - - - - Add Item - Voeg item toe - - - diff --git a/mycroft/res/ui/translations/settingListBox_pt.ts b/mycroft/res/ui/translations/settingListBox_pt.ts deleted file mode 100644 index d417ad962c35..000000000000 --- a/mycroft/res/ui/translations/settingListBox_pt.ts +++ /dev/null @@ -1,17 +0,0 @@ - - - - - settingListBox - - - Type here to add an item to the list - Digite aqui para adicionar um item à lista - - - - Add Item - Adicionar Item - - - diff --git a/mycroft/res/ui/translations/settingspage_de.ts b/mycroft/res/ui/translations/settingspage_de.ts deleted file mode 100644 index e36abc571bd4..000000000000 --- a/mycroft/res/ui/translations/settingspage_de.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - settingspage - - - Homescreen Settings - Einstellungen Homescreen - - - - Customize - Anpassen - - - - Display - Anzeige - - - - Enable SSH - SSH aktivieren - - - - Developer Settings - Entwicklereinstellungen - - - - About - Über - - - - Device Settings - Geräteeinstellungen - - - - Home - Home - - - diff --git a/mycroft/res/ui/translations/settingspage_es.ts b/mycroft/res/ui/translations/settingspage_es.ts deleted file mode 100644 index 5380aec85be8..000000000000 --- a/mycroft/res/ui/translations/settingspage_es.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - settingspage - - - Homescreen Settings - Configuración de la pantalla de inicio - - - - Customize - personalizar - - - - Display - Monitor - - - - Enable SSH - Habilitar SSH - - - - Developer Settings - Configuración del desarrollador - - - - About - Sobre - - - - Device Settings - Configuración de dispositivo - - - - Home - Hogar - - - diff --git a/mycroft/res/ui/translations/settingspage_fr.ts b/mycroft/res/ui/translations/settingspage_fr.ts deleted file mode 100644 index edc17e2311cb..000000000000 --- a/mycroft/res/ui/translations/settingspage_fr.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - settingspage - - - Homescreen Settings - Paramètres de l'écran d'accueil - - - - Customize - Personnaliser - - - - Display - Affichage - - - - Enable SSH - Activer SSH - - - - Developer Settings - Paramètres du développeur - - - - About - À propos de - - - - Device Settings - Réglages de l'appareil - - - - Home - Maison - - - diff --git a/mycroft/res/ui/translations/settingspage_it.ts b/mycroft/res/ui/translations/settingspage_it.ts deleted file mode 100644 index e4d7f5114458..000000000000 --- a/mycroft/res/ui/translations/settingspage_it.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - settingspage - - - Homescreen Settings - - - - - Customize - - - - - Display - - - - - Enable SSH - - - - - Developer Settings - - - - - About - - - - - Device Settings - - - - - Home - - - - diff --git a/mycroft/res/ui/translations/settingspage_nl.ts b/mycroft/res/ui/translations/settingspage_nl.ts deleted file mode 100644 index 1eafec9f42f5..000000000000 --- a/mycroft/res/ui/translations/settingspage_nl.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - settingspage - - - Homescreen Settings - Instellingen startscherm - - - - Customize - Aanpassen - - - - Display - Weergave - - - - Enable SSH - SSH inschakelen - - - - Developer Settings - Ontwikkelaarsinstellingen - - - - About - Over - - - - Device Settings - Apparaat instellingen - - - - Home - Huis - - - diff --git a/mycroft/res/ui/translations/settingspage_pt.ts b/mycroft/res/ui/translations/settingspage_pt.ts deleted file mode 100644 index acdd788a3927..000000000000 --- a/mycroft/res/ui/translations/settingspage_pt.ts +++ /dev/null @@ -1,47 +0,0 @@ - - - - - settingspage - - - Homescreen Settings - Configurações da tela inicial - - - - Customize - Customizar - - - - Display - Exibição - - - - Enable SSH - Ativar SSH - - - - Developer Settings - Configurações do desenvolvedor - - - - About - Sobre - - - - Device Settings - Configurações do dispositivo - - - - Home - Casa - - - diff --git a/mycroft/res/ui/translations/ssh_settings_de.ts b/mycroft/res/ui/translations/ssh_settings_de.ts deleted file mode 100644 index f2bbc1a83294..000000000000 --- a/mycroft/res/ui/translations/ssh_settings_de.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - ssh_settings - - - SSH Settings - Einstellungen SSH - - - - By enabling SSH Mode, anyone can access, change or delete anything on this device by connecting to it via another device. - Es besteht die Möglichkeit mit aktivem SSH, das Unbefugte an Daten dieses Geräts gelangen - - - - Enable SSH - SSH aktivieren - - - - Disable SSH - SSH deaktivieren - - - - Device Settings - Geräteeinstellungen - - - diff --git a/mycroft/res/ui/translations/ssh_settings_es.ts b/mycroft/res/ui/translations/ssh_settings_es.ts deleted file mode 100644 index b8c549b694e2..000000000000 --- a/mycroft/res/ui/translations/ssh_settings_es.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - ssh_settings - - - SSH Settings - - - - - By enabling SSH Mode, anyone can access, change or delete anything on this device by connecting to it via another device. - - - - - Enable SSH - - - - - Disable SSH - - - - - Device Settings - - - - diff --git a/mycroft/res/ui/translations/ssh_settings_fr.ts b/mycroft/res/ui/translations/ssh_settings_fr.ts deleted file mode 100644 index 6ee8fb31d246..000000000000 --- a/mycroft/res/ui/translations/ssh_settings_fr.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - ssh_settings - - - SSH Settings - - - - - By enabling SSH Mode, anyone can access, change or delete anything on this device by connecting to it via another device. - - - - - Enable SSH - - - - - Disable SSH - - - - - Device Settings - - - - diff --git a/mycroft/res/ui/translations/ssh_settings_it.ts b/mycroft/res/ui/translations/ssh_settings_it.ts deleted file mode 100644 index fe00e53e56f5..000000000000 --- a/mycroft/res/ui/translations/ssh_settings_it.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - ssh_settings - - - SSH Settings - - - - - By enabling SSH Mode, anyone can access, change or delete anything on this device by connecting to it via another device. - - - - - Enable SSH - - - - - Disable SSH - - - - - Device Settings - - - - diff --git a/mycroft/res/ui/translations/ssh_settings_nl.ts b/mycroft/res/ui/translations/ssh_settings_nl.ts deleted file mode 100644 index 2569deafd98e..000000000000 --- a/mycroft/res/ui/translations/ssh_settings_nl.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - ssh_settings - - - SSH Settings - - - - - By enabling SSH Mode, anyone can access, change or delete anything on this device by connecting to it via another device. - - - - - Enable SSH - - - - - Disable SSH - - - - - Device Settings - - - - diff --git a/mycroft/res/ui/translations/ssh_settings_pt.ts b/mycroft/res/ui/translations/ssh_settings_pt.ts deleted file mode 100644 index edd544ceeaed..000000000000 --- a/mycroft/res/ui/translations/ssh_settings_pt.ts +++ /dev/null @@ -1,32 +0,0 @@ - - - - - ssh_settings - - - SSH Settings - - - - - By enabling SSH Mode, anyone can access, change or delete anything on this device by connecting to it via another device. - - - - - Enable SSH - - - - - Disable SSH - - - - - Device Settings - - - - diff --git a/mycroft/res/wakeword_rsa b/mycroft/res/wakeword_rsa deleted file mode 100644 index 59ec09880c40..000000000000 --- a/mycroft/res/wakeword_rsa +++ /dev/null @@ -1,51 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIJKQIBAAKCAgEAt88+X1l0X4VS/46uQsVG7XIp3w8JmknevIkuXdNjoaC6pF+6 -waxEnzhNw0P26dCZBOz3tQkrSQnVA1xXVf8cqpSyGlsoOh/kE89gdSV4sTpf3eMZ -L+w90Yz3D4tqu8FEuKBBEEDdZSvUho2xCh5ffUiEntoCmMkWvZOJBXDTyMYcL3Pi -1ndCnp+tHEcOrG4TR5GsBzbifOeu5IYEW1GtOp2/fhDblZvnLpZSbZ51s/SXu10d -hg1Pl9bDpLZ5Zm2dx5X/AN7vV5d52+OWzDO9zK1yOubCmp70c3sAcfJvnqqxLnC7 -nFETHi3T7H4/qJ1xslWG3dVfFcSvUNHgw9ZGpemFXZ9EighEc9/63kH7bcwI1Ar1 -Omm68uzGT0K40LaBAWyTutSMYLFPQp/4nPWf+gc8R5WwKBHFznq6VInJF68mOoNz -ZNrMNzdQZt8jhA5wwQHFAjErMaiDn85lVvZYt+jztmzIxdB9rSsgk//pGVjlxUy7 -5QcUjOEg8JrQAXfusjxUtjAVTVgVJ6tdUvZRwRB+e9cMrNsGh3R5U1Oq175s4o1C -vEN4TZ2TkQP9PIhUdn29sUHmcXVEJujXDd7ZK7S58pCsaC4MG+gYQ6FYXT3TFluQ -MChYGC7Byiy6aP72uSUERc4enZuGrFaxsSy2vIyfRV12eU4yPML2DkqX1VsCAwEA -AQKCAgATgDhE02/GRpXUqSWRze5FeMw6bxT8uoOYCxHRQIEcf7ntgH6G16j8H3QY -mFhU3B2v6Rgqq8tc118zGRPm+sbmzhnLNAqjiAihlWnNY+lXHDNZjiN48x5n4gXA -L3FmdA2/bLkaaVdTyX+lutiikzBcUVpIpCaMYSE5gbKS0jKV5XbODgRt7n8x5wzt -qBhFcPQ4rprKtSb4S3hBpHpH2fV/94Z+cHlrePvg9G/QU3R3YCbM6Qcd1sGwAUgG -bJmapVyM9Tv1srE/4ME78/xms8KaOXiaCStyThTvP4h/jlILSl6755fv8KYPmJsY -Rxin4fRTEEHbvSx2WcSj1XB8NnqOJ5hQKwjmNsJBLJ/cGidgOAaIaFIhBBHBhv2a -CUHq54p0caspOiKF8ufafTkFZ3tgjxGoDhPc9uvuCOVn9orJ5SJLyu5RQRXQxpju -E/OyNp+FJh3mOhN8LU6UNr+9QKCUE6JR76qNtmS2Iy7/Gj8rLduu2K8x7EjcXMK3 -KvR0NibMIyUW1Hdk3L5RnZupShUDk/uGfT1ca5WoM9a0yQMnEhYfoYNEJWweb8fg -QbnKgHlad8ZwjUArGfTuwwVNNUKYUH2fp79wbp8AW9cmswI0Lr1HpeY7fsoHaIIO -k9v2MfN1+4ezSLCJefbIUxlaqEDzvF4wc8BuGNGYWrta61t2eQKCAQEA38jrnZM4 -s4rIiTJg9XNvHkYme4GtzDEANRe8xuAn4Qvj9vtNf5VvR0j70U+J6pWTN8YYfOcA -7YiOxDMLMZLCIqNHJ+dAOoa6iWu32e4M5FjbcEaeFHwHLqtPvhgo6PrrHGw/zdrO -/xZH/N+R3vgmwo7PZEvtsCiJS/nCsrxpxaWZ+eAFyKHo0zKeUTW9xXWTcQAV3o8e -A8IS0T2E4Y/yRqcJEci/XeauP5mwmXPDGEMYl5pLNghG/nQV/8qKJkigrmfokN9d -HDdbE+/g2FLjSQet67ijloKgu4IBV7DnYDQw2amC6E5wLnSGICiFYW0qu71dqdyV -LJhpjy8/L+W9fwKCAQEA0kUf9j1Ub7IylAxRx2CfOuU8FzgAStDWvqLKDFx22qK7 -4qqxZg7C+FX5ctDjmimovHSPNAjY+8eKkls4QzwZPieIWrJRMtgHw8+sFEanWShK -GLoPuYFkGtM2bQM2EK+yD4+wkuicimblpRAQ2OCMMZJ4aqBlqtbuDsMb4KcxPqNK -MBMxuj9kg5bvRNORAMOFsX6HOf8PyCHRLnLA8ZLPxduoFcmHWKd2D24vcZFO8HWz -ISAJPOuqVKTQhCnZvtS/MYw+c71HOqWgSXFzdUyjyMd9rLUlXcDEaw7sSqcf+vdo -CqOYbnQpW4ki8Ma9paxRTEOzt0AiA6RP264nQjmOJQKCAQEAuX/+N0dTKBjxtDBr -iOrgADNcMOLE4073AgukMyKaTAUkOZYEnq6LaIbKHq4U/7xvJTtzDw4Zicy5s08w -hy5E+JtqH1yktB78P29oHiEi1KIHfGE9JnPNLFVbK5MxTja4b34XwZcQIQkiMS5N -54rB7mKc7WG3LF/dt3nYd3qRHwHvyd52TOJRccgyzdSDc0vMJU5R0oPF+I2GNaYO -IT/GL+TEMta6MqdGZ3gJmJoJ7XGoz/pZP/fKiaBGoBsPOz7W2ttNP9G3h+0m9TbR -pd/HgcD43T3XdKrhe6z/WeZNVUTN/Y9y8QgcG5YBnGSac7EfTDJjkqtDiIzqa4NZ -mGWTFwKCAQEAw+zZDU60QKegbUbVZJvpgq1awp/R1eSmVFfHQKFftfVwcJJwXhJf -JZqmpo9xpJIwwfkx/mBIHsMdoaYR1MRJGRso+Kmy81dMVO5K/1GeWXsrH8MvJ8Ej -D8PCsO0PEZlEpy9SbnEEfAnI7Xb827jPqNk8Ds6KLRe8FlFCxp/DSQRJ+mXILi0n -cV3QcSdZs4Z8KpklU6sQf4DTMx6GHhKYO1qjUjnIPZk8bsBSwNWO4owpbzI0qWlF -+zzfdmawmBoQVRDCmIHDvyfZJNXrqV7SNiF8PtNDkAowezkaf60eJXEmptMtE651 -Yu9zeTsWNytLTW7AJH5Ds3UFXEL4HcMXaQKCAQAcPQUrXBISi85ma/sAdZHN6YKR -BIHaVMxOraXqGyfTK5mgqA2Nw4mjyWquXoxbHSyFmEUQsXKPwyQgya0ktLdy2fHJ -AWV8oXCY45uwcaCzlnz3MgMJQnxDeodLYbcOSnmSOC/KaO3omw5O9QAWlEwiTdoL -hBF3jC+o24AiO/wceRdgTSDYnY9BTKrtSel0i9s6QptL7IpC4cfEB9vUh47OkssS -v2Mn1bcFZPoJLvpU8oNXZTASN6zDo2jUuQ3P5C2XaVdZ4fhEibcqA3RNSeSNg8qf -2GNhsH8zurW5sgD+3d7X05q0LqIB+kOxVljICkQ64HXFwtpriIYrXTi7UvfD ------END RSA PRIVATE KEY----- diff --git a/mycroft/session/__init__.py b/mycroft/session/__init__.py deleted file mode 100644 index 19786361105e..000000000000 --- a/mycroft/session/__init__.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import time -from threading import Lock -from uuid import uuid4 - -from ovos_config.config import Configuration -from ovos_utils.log import LOG - - -class Session: - """ - An class representing a Mycroft Session Identifier - """ - - def __init__(self, session_id, expiration_seconds=180): - self.session_id = session_id - self.touch_time = int(time.time()) - self.expiration_seconds = expiration_seconds - - def touch(self): - """ - update the touch_time on the session - - :return: - """ - self.touch_time = int(time.time()) - - def expired(self): - """ - determine if the session has expired - - :return: - """ - return int(time.time()) - self.touch_time > self.expiration_seconds - - def __str__(self): - return "{%s,%d}" % (str(self.session_id), self.touch_time) - - -class SessionManager: - """ Keeps track of the current active session. """ - __current_session = None - __lock = Lock() - - @staticmethod - def get(): - """ - get the active session. - - :return: An active session - """ - config = Configuration().get('session') - - with SessionManager.__lock: - if (not SessionManager.__current_session or - SessionManager.__current_session.expired()): - SessionManager.__current_session = Session( - str(uuid4()), expiration_seconds=config.get('ttl', 180)) - LOG.info( - "New Session Start: " + - SessionManager.__current_session.session_id) - return SessionManager.__current_session - - @staticmethod - def touch(): - """ - Update the last_touch timestamp on the current session - - :return: None - """ - SessionManager.get().touch() diff --git a/mycroft/skills/__init__.py b/mycroft/skills/__init__.py deleted file mode 100644 index 393e01778b67..000000000000 --- a/mycroft/skills/__init__.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" Mycroft skills module, collection of tools for building skills. - -These classes, decorators and functions are used to build skills for Mycroft. -""" - -from mycroft.skills.mycroft_skill import (intent_handler, - intent_file_handler, - resting_screen_handler, - skill_api_method) -from ovos_workshop.skills.fallback import FallbackSkill -from ovos_workshop.skills.ovos import OVOSSkill as MycroftSkill -from mycroft.skills.common_iot_skill import CommonIoTSkill -from mycroft.skills.common_play_skill import CommonPlaySkill, CPSMatchLevel -from mycroft.skills.common_query_skill import CommonQuerySkill, CQSMatchLevel - -try: - from mycroft.skills.intent_service import AdaptIntent -except ImportError: - pass # do not require adapt installed, only needed by skill service! - -__all__ = ['MycroftSkill', - 'intent_handler', - 'intent_file_handler', - 'resting_screen_handler', - 'FallbackSkill', - 'CommonIoTSkill', - 'CommonPlaySkill', - 'CPSMatchLevel', - 'CommonQuerySkill', - 'CQSMatchLevel'] diff --git a/mycroft/skills/__main__.py b/mycroft/skills/__main__.py deleted file mode 100644 index 5030b9163a05..000000000000 --- a/mycroft/skills/__main__.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Daemon launched at startup to handle skill activities. - -In this repo, you will not find an entry called mycroft-skills in the bin -directory. The executable gets added to the bin directory when installed -(see setup.py) -""" -from ovos_core.__main__ import main, shutdown - -# keep these imports for backwards compat! -from mycroft.skills.api import SkillApi -from ovos_workshop.skills.fallback import FallbackSkill -from ovos_bus_client.util.scheduler import EventScheduler -from mycroft.skills.intent_service import IntentService -from mycroft.skills.skill_manager import SkillManager, on_error, on_stopping, on_ready, on_alive, on_started -from mycroft.deprecated.skills import DevicePrimer, RASPBERRY_PI_PLATFORMS - - -if __name__ == "__main__": - main() diff --git a/mycroft/skills/api.py b/mycroft/skills/api.py deleted file mode 100644 index ce825c1a02cb..000000000000 --- a/mycroft/skills/api.py +++ /dev/null @@ -1 +0,0 @@ -from ovos_workshop.skills.api import SkillApi diff --git a/mycroft/skills/audioservice.py b/mycroft/skills/audioservice.py deleted file mode 100644 index 280b6a49077d..000000000000 --- a/mycroft/skills/audioservice.py +++ /dev/null @@ -1,2 +0,0 @@ -# this was moved in order to allow importing it without dragging skills service dependencies -from ovos_bus_client.apis.ocp import ClassicAudioServiceInterface as AudioService diff --git a/mycroft/skills/common_iot_skill.py b/mycroft/skills/common_iot_skill.py deleted file mode 100644 index bcaec91b1de6..000000000000 --- a/mycroft/skills/common_iot_skill.py +++ /dev/null @@ -1,574 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# THE CLASSES IN THIS FILE ARE STILL EXPERIMENTAL, AND ARE SUBJECT TO -# CHANGES. IT IS PROVIDED NOW AS A PREVIEW, SO SKILL AUTHORS CAN GET -# AN IDEA OF WHAT IS TO COME. YOU ARE FREE TO BEGIN EXPERIMENTING, BUT -# BE WARNED THAT THE CLASSES, FUNCTIONS, ETC MAY CHANGE WITHOUT WARNING. - -from abc import ABC, abstractmethod -from contextlib import contextmanager -from enum import Enum, unique -from functools import total_ordering, wraps -from itertools import count - -from ovos_workshop.skills.ovos import OVOSSkill as MycroftSkill -from ovos_bus_client.message import Message, dig_for_message - -ENTITY = "ENTITY" -SCENE = "SCENE" -IOT_REQUEST_ID = "iot_request_id" # TODO make the id a property of the request - -_counter = count() - - -def auto(): - """ - Indefinitely return the next number in sequence from 0. - - This can be replaced with enum.auto when we no longer - need to support python3.4. - """ - return next(_counter) - - -class _BusKeys: - """ - This class contains some strings used to identify - messages on the messagebus. They are used in in - CommonIoTSkill and the IoTController skill, but - are not intended to be used elsewhere. - """ - BASE = "iot" - TRIGGER = BASE + ":trigger" - RESPONSE = TRIGGER + ".response" - RUN = BASE + ":run." # Will have skill_id appened - REGISTER = BASE + "register" - CALL_FOR_REGISTRATION = REGISTER + ".request" - SPEAK = BASE + ":speak" - - -#################################################################### -# When adding a new Thing, Attribute, etc, be sure to also add the # -# corresponding voc files to the skill-iot-control. # -#################################################################### - -@unique -class Thing(Enum): - """ - This class represents 'Things' which may be controlled - by IoT Skills. This is intended to be used with the - IoTRequest class. See that class for more details. - """ - LIGHT = auto() - THERMOSTAT = auto() - DOOR = auto() - LOCK = auto() - PLUG = auto() - SWITCH = auto() - TEMPERATURE = auto() # Control desired high and low temperatures - HEAT = auto() # Control desired low temperature - AIR_CONDITIONING = auto() # Control desired high temperature - - -@unique -class Attribute(Enum): - """ - This class represents 'Attributes' of 'Things'. - """ - BRIGHTNESS = auto() - COLOR = auto() - COLOR_TEMPERATURE = auto() - TEMPERATURE = auto() - - -@unique -class State(Enum): - """ - This class represents 'States' of 'Things'. - - These are generally intended to handle binary - queries, such as "is the door locked?" or - "is the heat on?" where 'locked' and 'on' - are the state values. The special value - 'STATE' can be used for more general queries - capable of providing more detailed in formation, - for example, "what is the state of the lamp?" - could produce state information that includes - brightness or color. - """ - STATE = auto() - POWERED = auto() - UNPOWERED = auto() - LOCKED = auto() - UNLOCKED = auto() - OCCUPIED = auto() - UNOCCUPIED = auto() - - -@unique -class Action(Enum): - """ - This class represents 'Actions' that can be applied to - 'Things,' e.d. a LIGHT can be turned ON. It is intended - to be used with the IoTRequest class. See that class - for more details. - """ - ON = auto() - OFF = auto() - TOGGLE = auto() - ADJUST = auto() - SET = auto() - INCREASE = auto() - DECREASE = auto() - TRIGGER = auto() - BINARY_QUERY = auto() # yes/no answer - INFORMATION_QUERY = auto() # detailed answer - LOCATE = auto() - LOCK = auto() - UNLOCK = auto() - - -@total_ordering -class IoTRequestVersion(Enum): - """ - Enum indicating support IoTRequest fields - - This class allows us to extend the request without - requiring that all existing skills are updated to - handle the new fields. Skills will simply not respond - to requests that contain fields they are not aware of. - - CommonIoTSkill subclasses should override - CommonIoTSkill.supported_request_version to indicate - their level of support. For backward compatibility, - the default is V1. - - Note that this is an attempt to avoid false positive - matches (i.e. prevent skills from reporting that they - can handle a request that contains fields they don't - know anything about). To avoid any possibility of - false negatives, however, skills should always try to - support the latest version. - - Version to supported fields (provided only for reference - always use the - latest version available, and account for all fields): - - V1 = {'action', 'thing', 'attribute', 'entity', 'scene'} - V2 = V1 | {'value'} - V3 = V2 | {'state'} - """ - - def __lt__(self, other): - return self.name < other.name - - V1 = {'action', 'thing', 'attribute', 'entity', 'scene'} - V2 = V1 | {'value'} - V3 = V2 | {'state'} - - -class IoTRequest: - """ - This class represents a request from a user to control - an IoT device. It contains all of the information an IoT - skill should need in order to determine if it can handle - a user's request. The information is supplied as properties - on the request. At present, those properties are: - - action (see the Action enum) - thing (see the Thing enum) - state (see the State enum) - attribute (see the Attribute enum) - value - entity - scene - - The 'action' is mandatory, and will always be not None. The - other fields may be None. - - The 'entity' is intended to be used for user-defined values - specific to a skill. For example, in a skill controlling Lights, - an 'entity' might represent a group of lights. For a smart-lock - skill, it might represent a specific lock, e.g. 'front door.' - - The 'scene' value is also intended to to be used for user-defined - values. Skills that extend CommonIotSkill are expected to register - their own scenes. The controller skill will have the ability to - trigger multiple skills, so common scene names may trigger many - skills, for a coherent experience. - - The 'value' property will be a number value. This is intended to - be used for requests such as "set the heat to 70 degrees" and - "set the lights to 50% brightness." - - Skills that extend CommonIotSkill will be expected to register - their own entities. See the documentation in CommonIotSkill for - more details. - """ - - def __init__(self, - action: Action, - thing: Thing = None, - attribute: Attribute = None, - entity: str = None, - scene: str = None, - value: int = None, - state: State = None): - - if not thing and not entity and not scene: - raise Exception("At least one of thing," - " entity, or scene must be present!") - - self.action = action - self.thing = thing - self.attribute = attribute - self.entity = entity - self.scene = scene - self.value = value - self.state = state - - def __repr__(self): - template = ('IoTRequest(' - 'action={action},' - ' thing={thing},' - ' attribute={attribute},' - ' entity={entity},' - ' scene={scene},' - ' value={value},' - ' state={state}' - ')') - entity = '"{}"'.format(self.entity) if self.entity else None - scene = '"{}"'.format(self.scene) if self.scene else None - value = '"{}"'.format(self.value) if self.value is not None else None - return template.format( - action=self.action, - thing=self.thing, - attribute=self.attribute, - entity=entity, - scene=scene, - value=value, - state=self.state - ) - - @property - def version(self): - if self.state is not None: - return IoTRequestVersion.V3 - if self.value is not None: - return IoTRequestVersion.V2 - return IoTRequestVersion.V1 - - def to_dict(self): - return { - 'action': self.action.name, - 'thing': self.thing.name if self.thing else None, - 'attribute': self.attribute.name if self.attribute else None, - 'entity': self.entity, - 'scene': self.scene, - 'value': self.value, - 'state': self.state.name if self.state else None - } - - @classmethod - def from_dict(cls, data: dict): - data = data.copy() - data['action'] = Action[data['action']] - if data.get('thing') not in (None, ''): - data['thing'] = Thing[data['thing']] - if data.get('attribute') not in (None, ''): - data['attribute'] = Attribute[data['attribute']] - if data.get('state') not in (None, ''): - data['state'] = State[data['state']] - - return cls(**data) - - -def _track_request(func): - """ - Used within the CommonIoT skill to track IoT requests. - - The primary purpose of tracking the reqeust is determining - if the skill is currently handling an IoT request, or is - running a standard intent. While running IoT requests, certain - methods defined on MycroftSkill should behave differently than - under normal circumstances. In particular, speech related methods - should not actually trigger speech, but instead pass the message - to the IoT control skill, which will handle deconfliction (in the - event multiple skills want to respond verbally to the same request). - - Args: - func: Callable - - Returns: - Callable - - """ - - @wraps(func) - def tracking_function(self, message: Message): - with self._current_request(message.data.get(IOT_REQUEST_ID)): - func(self, message) - - return tracking_function - - -class CommonIoTSkill(MycroftSkill, ABC): - """ - Skills that want to work with the CommonIoT system should - extend this class. Subclasses will be expected to implement - two methods, `can_handle` and `run_request`. See the - documentation for those functions for more details on how - they are expected to behave. - - Subclasses may also register their own entities and scenes. - See the register_entities and register_scenes methods for - details. - - This class works in conjunction with a controller skill. - The controller registers vocabulary and intents to capture - IoT related requests. It then emits messages on the messagebus - that will be picked up by all skills that extend this class. - Each skill will have the opportunity to declare whether or not - it can handle the given request. Skills that acknowledge that - they are capable of handling the request will be considered - candidates, and after a short timeout, a winner, or winners, - will be chosen. With this setup, a user can have several IoT - systems, and control them all without worry that skills will - step on each other. - """ - - @wraps(MycroftSkill.__init__) - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self._current_iot_request = None - - def bind(self, bus): - """ - Overrides MycroftSkill.bind. - - This is called automatically during setup, and - need not otherwise be used. - - Subclasses that override this method must call this - via super in their implementation. - - Args: - bus: - """ - if bus: - super().bind(bus) - self.add_event(_BusKeys.TRIGGER, - self._handle_trigger, - speak_errors=False) - self.add_event(_BusKeys.RUN + self.skill_id, - self._run_request, - speak_errors=False) - self.add_event(_BusKeys.CALL_FOR_REGISTRATION, - self._handle_call_for_registration, - speak_errors=False) - - @contextmanager - def _current_request(self, id: str): - # Multiple simultaneous requests may interfere with each other as they - # would overwrite this value, however, this seems unlikely to cause - # any real world issues and tracking multiple requests seems as - # likely to cause issues as to solve them. - self._current_iot_request = id - yield id - self._current_iot_request = None - - @_track_request - def _handle_trigger(self, message: Message): - """ - Given a message, determines if this skill can - handle the request. If it can, it will emit - a message on the bus indicating that. - - Args: - message: Message - """ - data = message.data - request = IoTRequest.from_dict(data[IoTRequest.__name__]) - - if request.version > self.supported_request_version: - return - - can_handle, callback_data = self.can_handle(request) - if can_handle: - data.update({"skill_id": self.skill_id, - "callback_data": callback_data}) - message.context["skill_id"] = self.skill_id - self.bus.emit(message.response(data)) - - @_track_request - def _run_request(self, message: Message): - """ - Given a message, extracts the IoTRequest and - callback_data and sends them to the run_request - method. - - Args: - message: Message - """ - request = IoTRequest.from_dict(message.data[IoTRequest.__name__]) - callback_data = message.data["callback_data"] - self.run_request(request, callback_data) - - def speak(self, utterance, *args, **kwargs): - if self._current_iot_request: - message = dig_for_message() - message.context["skill_id"] = self.skill_id - self.bus.emit(message.forward(_BusKeys.SPEAK, - data={"skill_id": self.skill_id, - IOT_REQUEST_ID: - self._current_iot_request, - "speak_args": args, - "speak_kwargs": kwargs, - "speak": utterance})) - else: - super().speak(utterance, *args, **kwargs) - - def _handle_call_for_registration(self, _: Message): - """ - Register this skill's scenes and entities when requested. - - Args: - _: Message. This is ignored. - """ - self.register_entities_and_scenes() - - def _register_words(self, words: [str], word_type: str): - """ - Emit a message to the controller skill to register vocab. - - Emits a message on the bus containing the type and - the words. The message will be picked up by the - controller skill, and the vocabulary will be registered - to that skill. - - Args: - words: - word_type: - """ - if words: - self.bus.emit(Message(_BusKeys.REGISTER, - data={"skill_id": self.skill_id, - "type": word_type, - "words": list(words)}, - context={"skill_id": self.skill_id})) - - def register_entities_and_scenes(self): - """ - This method will register this skill's scenes and entities. - - This should be called in the skill's `initialize` method, - at some point after `get_entities` and `get_scenes` can - be expected to return correct results. - - """ - self._register_words(self.get_entities(), ENTITY) - self._register_words(self.get_scenes(), SCENE) - - @property - def supported_request_version(self) -> IoTRequestVersion: - """ - Get the supported IoTRequestVersion - - By default, this returns IoTRequestVersion.V1. Subclasses - should override this to indicate higher levels of support. - - The documentation for IoTRequestVersion provides a reference - indicating which fields are included in each version. Note - that you should always take the latest, and account for all - request fields. - """ - return IoTRequestVersion.V1 - - def get_entities(self) -> [str]: - """ - Get a list of custom entities. - - This is intended to be overridden by subclasses, though it - it not required (the default implementation will return an - empty list). - - The strings returned by this function will be registered - as ENTITY values with the intent parser. Skills should provide - group names, user aliases for specific devices, or anything - else that might represent a THING or a set of THINGs, e.g. - 'bedroom', 'lamp', 'front door.' This allows commands that - don't explicitly include a THING to still be handled, e.g. - "bedroom off" as opposed to "bedroom lights off." - """ - return [] - - def get_scenes(self) -> [str]: - """ - Get a list of custom scenes. - - This method is intended to be overridden by subclasses, though - it is not required. The strings returned by this function will - be registered as SCENE values with the intent parser. Skills - should provide user defined scene names that they are aware of - and capable of handling, e.g. "relax," "movie time," etc. - """ - return [] - - @abstractmethod - def can_handle(self, request: IoTRequest): - """ - Determine if an IoTRequest can be handled by this skill. - - This method must be implemented by all subclasses. - - An IoTRequest contains several properties (see the - documentation for that class). This method should return - True if and only if this skill can take the appropriate - 'action' when considering all other properties - of the request. In other words, a partial match, one in which - any piece of the IoTRequest is not known to this skill, - and is not None, this should return (False, None). - - Args: - request: IoTRequest - - Returns: (boolean, dict) - True if and only if this skill knows about all the - properties set on the IoTRequest, and a dict containing - callback_data. If this skill is chosen to handle the - request, this dict will be supplied to `run_request`. - - Note that the dictionary will be sent over the bus, and thus - must be JSON serializable. - """ - return False, None - - @abstractmethod - def run_request(self, request: IoTRequest, callback_data: dict): - """ - Handle an IoT Request. - - All subclasses must implement this method. - - When this skill is chosen as a winner, this function will be called. - It will be passed an IoTRequest equivalent to the one that was - supplied to `can_handle`, as well as the `callback_data` returned by - `can_handle`. - - Args: - request: IoTRequest - callback_data: dict - """ - pass diff --git a/mycroft/skills/common_play_skill.py b/mycroft/skills/common_play_skill.py deleted file mode 100644 index 04a94ec3386d..000000000000 --- a/mycroft/skills/common_play_skill.py +++ /dev/null @@ -1,311 +0,0 @@ -# Copyright 2018 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import re -from enum import Enum, IntEnum -from abc import ABC, abstractmethod -from ovos_bus_client.message import Message -from ovos_workshop.skills import OVOSSkill -from ovos_bus_client.apis.ocp import ClassicAudioServiceInterface as AudioService - - -class CPSMatchLevel(Enum): - EXACT = 1 - MULTI_KEY = 2 - TITLE = 3 - ARTIST = 4 - CATEGORY = 5 - GENERIC = 6 - - -class CPSTrackStatus(IntEnum): - DISAMBIGUATION = 1 # not queued for playback, show in gui - PLAYING = 20 # Skill is handling playback internally - PLAYING_AUDIOSERVICE = 21 # Skill forwarded playback to audio service - PLAYING_GUI = 22 # Skill forwarded playback to gui - PLAYING_ENCLOSURE = 23 # Skill forwarded playback to enclosure - QUEUED = 30 # Waiting playback to be handled inside skill - QUEUED_AUDIOSERVICE = 31 # Waiting playback in audio service - QUEUED_GUI = 32 # Waiting playback in gui - QUEUED_ENCLOSURE = 33 # Waiting for playback in enclosure - PAUSED = 40 # media paused but ready to resume - STALLED = 60 # playback has stalled, reason may be unknown - BUFFERING = 61 # media is buffering from an external source - END_OF_MEDIA = 90 # playback finished, is the default state when CPS loads - - -class CommonPlaySkill(OVOSSkill, ABC): - """ To integrate with the common play infrastructure of Mycroft - skills should use this base class and override the two methods - `CPS_match_query_phrase` (for checking if the skill can play the - utterance) and `CPS_start` for launching the media. - - The class makes the skill available to queries from the - mycroft-playback-control skill and no special vocab for starting playback - is needed. - """ - - def __init__(self, *args, **kwargs): - self.audioservice = None - super().__init__(*args, **kwargs) - self.play_service_string = None - - # "MusicServiceSkill" -> "Music Service" - spoken = self.name or self.__class__.__name__ - self.spoken_name = re.sub(r"([a-z])([A-Z])", r"\g<1> \g<2>", - spoken.replace("Skill", "")) - # NOTE: Derived skills will likely want to override self.spoken_name - # with a translatable name in their initialize() method. - - def bind(self, bus): - """Overrides the normal bind method. - - Adds handlers for play:query and play:start messages allowing - interaction with the playback control skill. - - This is called automatically during setup, and - need not otherwise be used. - """ - if bus: - super().bind(bus) - self.audioservice = AudioService(self.bus) - self.add_event('play:query', self.__handle_play_query, speak_errors=False) - self.add_event('play:start', self.__handle_play_start, speak_errors=False) - - def __handle_play_query(self, message): - """Query skill if it can start playback from given phrase.""" - search_phrase = message.data["phrase"] - message.context["skill_id"] = self.skill_id - # First, notify the requestor that we are attempting to handle - # (this extends a timeout while this skill looks for a match) - self.bus.emit(message.response({"phrase": search_phrase, - "skill_id": self.skill_id, - "searching": True})) - - # Now invoke the CPS handler to let the skill perform its search - result = self.CPS_match_query_phrase(search_phrase) - - if result: - match = result[0] - level = result[1] - callback = result[2] if len(result) > 2 else None - confidence = self.__calc_confidence(match, search_phrase, level) - self.bus.emit(message.response({"phrase": search_phrase, - "skill_id": self.skill_id, - "callback_data": callback, - "service_name": self.spoken_name, - "conf": confidence})) - else: - # Signal we are done (can't handle it) - self.bus.emit(message.response({"phrase": search_phrase, - "skill_id": self.skill_id, - "searching": False})) - - def __calc_confidence(self, match, phrase, level): - """Translate confidence level and match to a 0-1 value. - - "play pandora" - "play pandora is my girlfriend" - "play tom waits on pandora" - - Assume the more of the words that get consumed, the better the match - - Args: - match (str): Matching string - phrase (str): original input phrase - level (CPSMatchLevel): match level - """ - consumed_pct = len(match.split()) / len(phrase.split()) - if consumed_pct > 1.0: - consumed_pct = 1.0 / consumed_pct # deal with over/under-matching - - # We'll use this to modify the level, but don't want it to allow a - # match to jump to the next match level. So bonus is 0 - 0.05 (1/20) - bonus = consumed_pct / 20.0 - - if level == CPSMatchLevel.EXACT: - return 1.0 - elif level == CPSMatchLevel.MULTI_KEY: - return 0.9 + bonus - elif level == CPSMatchLevel.TITLE: - return 0.8 + bonus - elif level == CPSMatchLevel.ARTIST: - return 0.7 + bonus - elif level == CPSMatchLevel.CATEGORY: - return 0.6 + bonus - elif level == CPSMatchLevel.GENERIC: - return 0.5 + bonus - else: - return 0.0 # should never happen - - def __handle_play_start(self, message): - """Bus handler for starting playback using the skill.""" - if message.data["skill_id"] != self.skill_id: - # Not for this skill! - return - phrase = message.data["phrase"] - data = message.data.get("callback_data") - - # Stop any currently playing audio - if self.audioservice and self.audioservice.is_playing: - self.audioservice.stop() - message.context["skill_id"] = self.skill_id - self.bus.emit(message.forward("mycroft.stop")) - - # Save for CPS_play() later, e.g. if phrase includes modifiers like - # "... on the chromecast" - self.play_service_string = phrase - - self.activate() - - # Invoke derived class to provide playback data - self.CPS_start(phrase, data) - - def CPS_play(self, *args, **kwargs): - """Begin playback of a media file or stream - - Normally this method will be invoked with somthing like: - self.CPS_play(url) - Advanced use can also include keyword arguments, such as: - self.CPS_play(url, repeat=True) - - Args: - same as the Audioservice.play method - """ - # Inject the user's utterance in case the audio backend wants to - # interpret it. E.g. "play some rock at full volume on the stereo" - if 'utterance' not in kwargs: - kwargs['utterance'] = self.play_service_string - self.audioservice.play(*args, **kwargs) - self.CPS_send_status(uri=args[0], - status=CPSTrackStatus.PLAYING_AUDIOSERVICE) - - def stop(self): - """Stop anything playing on the audioservice.""" - if self.audioservice and self.audioservice.is_playing: - self.audioservice.stop() - return True - else: - return False - - ###################################################################### - # Abstract methods - # All of the following must be implemented by a skill that wants to - # act as a CommonPlay Skill - @abstractmethod - def CPS_match_query_phrase(self, phrase): - """Analyze phrase to see if it is a play-able phrase with this skill. - - Args: - phrase (str): User phrase uttered after "Play", e.g. "some music" - - Returns: - (match, CPSMatchLevel[, callback_data]) or None: Tuple containing - a string with the appropriate matching phrase, the PlayMatch - type, and optionally data to return in the callback if the - match is selected. - """ - # Derived classes must implement this, e.g. - # - # if phrase in ["Zoosh"]: - # return ("Zoosh", CPSMatchLevel.Generic, {"hint": "music"}) - # or: - # zoosh_song = find_zoosh(phrase) - # if zoosh_song and "Zoosh" in phrase: - # # "play Happy Birthday in Zoosh" - # return ("Zoosh", CPSMatchLevel.MULTI_KEY, {"song": zoosh_song}) - # elif zoosh_song: - # # "play Happy Birthday" - # return ("Zoosh", CPSMatchLevel.TITLE, {"song": zoosh_song}) - # elif "Zoosh" in phrase - # # "play Zoosh" - # return ("Zoosh", CPSMatchLevel.GENERIC, {"cmd": "random"}) - return None - - @abstractmethod - def CPS_start(self, phrase, data): - """Begin playing whatever is specified in 'phrase' - - Args: - phrase (str): User phrase uttered after "Play", e.g. "some music" - data (dict): Callback data specified in match_query_phrase() - """ - # Derived classes must implement this, e.g. - # self.CPS_play("http://zoosh.com/stream_music") - pass - - def CPS_extend_timeout(self, timeout=5): - """Request Common Play Framework to wait another {timeout} seconds - for an answer from this skill. - - Args: - timeout (int): Number of seconds - """ - self.bus.emit(Message('play:query.response', - {"phrase": self.play_service_string, - "searching": True, - "timeout": timeout, - "skill_id": self.skill_id})) - - def CPS_send_status(self, artist='', track='', album='', image='', - uri='', track_length=None, elapsed_time=None, - playlist_position=None, - status=CPSTrackStatus.DISAMBIGUATION, **kwargs): - """Inform system of playback status. - - If a skill is handling playback and wants the playback control to be - aware of it's current status it can emit this message indicating that - it's performing playback and can provide some standard info. - - All parameters are optional so any can be left out. Also if extra - non-standard parameters are added, they too will be sent in the message - data. - - Args: - artist (str): Current track artist - track (str): Track name - album (str): Album title - image (str): url for image to show - uri (str): uri for track - track_length (float): track length in seconds - elapsed_time (float): current offset into track in seconds - playlist_position (int): Position in playlist of current track - """ - data = {'skill': self.name, - 'uri': uri, - 'artist': artist, - 'album': album, - 'track': track, - 'image': image, - 'track_length': track_length, - 'elapsed_time': elapsed_time, - 'playlist_position': playlist_position, - 'status': status - } - data = {**data, **kwargs} # Merge extra arguments - self.bus.emit(Message('play:status', data)) - - def CPS_send_tracklist(self, tracklist): - """Inform system of playlist track info. - - Provides track data for playlist - - Args: - tracklist (list/dict): Tracklist data - """ - tracklist = tracklist or [] - if not isinstance(tracklist, list): - tracklist = [tracklist] - for idx, track in enumerate(tracklist): - self.CPS_send_status(playlist_position=idx, **track) diff --git a/mycroft/skills/common_query_skill.py b/mycroft/skills/common_query_skill.py deleted file mode 100644 index 98459c0338ce..000000000000 --- a/mycroft/skills/common_query_skill.py +++ /dev/null @@ -1,22 +0,0 @@ -# backwards compat imports, do not remove before 0.1.0 / 0.2.0 -from enum import IntEnum -from ovos_workshop.skills.common_query_skill import CommonQuerySkill, CQSMatchLevel, \ - TOPIC_MATCH_RELEVANCE, RELEVANCE_MULTIPLIER, WORD_COUNT_DIVISOR, MAX_ANSWER_LEN_FOR_CONFIDENCE - - -# DEPRECATED - remove in 0.1.0 - mk2 hardcoded hacks -CQSVisualMatchLevel = IntEnum('CQSVisualMatchLevel', - [e.name for e in CQSMatchLevel]) - - -def is_CQSVisualMatchLevel( - match_level): - return isinstance(match_level, type(CQSVisualMatchLevel.EXACT)) - - -VISUAL_DEVICES = ['mycroft_mark_2'] - - -def handles_visuals(platform): - return platform in VISUAL_DEVICES - diff --git a/mycroft/skills/context.py b/mycroft/skills/context.py deleted file mode 100644 index 57c9040a53df..000000000000 --- a/mycroft/skills/context.py +++ /dev/null @@ -1,2 +0,0 @@ -# backward compat imports -from ovos_workshop.decorators import adds_context, removes_context diff --git a/mycroft/skills/core.py b/mycroft/skills/core.py deleted file mode 100644 index 74e269183bcb..000000000000 --- a/mycroft/skills/core.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -""" Collection of core functions of the mycroft skills system. - -This file is now depricated and skill should now import directly from -mycroft.skills. -""" -# Import moved methods for backwards compatibility -# This will need to remain here for quite some time since removing it -# would break most of the skills out there. -from ovos_workshop.skills.ovos import OVOSSkill as MycroftSkill -from ovos_workshop.skills.fallback import FallbackSkill -from mycroft.skills.mycroft_skill import resting_screen_handler, intent_handler, intent_file_handler, skill_api_method - - diff --git a/mycroft/skills/event_scheduler.py b/mycroft/skills/event_scheduler.py deleted file mode 100644 index f7186cf9188f..000000000000 --- a/mycroft/skills/event_scheduler.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Event scheduler system for calling skill (and other) methods at a specific -times. -""" -# backwards compat - do not delete until 0.2.0 -from ovos_bus_client.util.scheduler import repeat_time, EventScheduler, \ - EventContainer, EventSchedulerInterface -from ovos_utils.events import create_basic_wrapper - diff --git a/mycroft/skills/fallback_skill.py b/mycroft/skills/fallback_skill.py deleted file mode 100644 index caf3f8d8e4af..000000000000 --- a/mycroft/skills/fallback_skill.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""The fallback skill implements a special type of skill handling -utterances not handled by the intent system. -""" -from ovos_workshop.skills.fallback import FallbackSkill, FallbackMode diff --git a/mycroft/skills/intent_service.py b/mycroft/skills/intent_service.py deleted file mode 100644 index 19bc99bf7653..000000000000 --- a/mycroft/skills/intent_service.py +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Mycroft's intent service, providing intent parsing since forever!""" -from mycroft.metrics import report_timing -from mycroft.skills.intent_services import ( - IntentMatch -) -from ovos_bus_client.message import Message -from ovos_core.intent_services import IntentService as _IS -from ovos_utils.log import LOG -# compat imports -from ovos_workshop.intents import open_intent_envelope - - -class IntentService(_IS): - """Mycroft intent service. parses utterances using a variety of systems. - - The intent service also provides the internal API for registering and - querying the intent service. - """ - - def do_converse(self, utterances, skill_id, lang, message): - """DEPRECATED: do not use, method only for api backwards compatibility - - Logs a warning and calls ConverseService.converse - - Args: - utterances (list of tuples): utterances paired with normalized - versions. - skill_id: skill to query. - lang (str): current language - message (Message): message containing interaction info. - """ - # NOTE: can not delete method for backwards compat with upstream - LOG.warning("self.do_converse has been deprecated!\n" - "use self.converse.converse instead") - return self.converse.converse(utterances, skill_id, lang, message) - - def handle_converse_error(self, message): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning - """ - # NOTE: can not delete method for backwards compat with upstream - LOG.warning("handle_converse_error has been deprecated!") - - def remove_active_skill(self, skill_id): - """DEPRECATED: do not use, method only for api backwards compatibility - - Logs a warning and calls ConverseService.deactivate_skill - - Args: - skill_id (str): skill to remove - """ - # NOTE: can not delete method for backwards compat with upstream - LOG.warning("self.remove_active_skill has been deprecated!\n" - "use self.converse.deactivate_skill instead") - self.converse.deactivate_skill(skill_id) - - def add_active_skill(self, skill_id): - """DEPRECATED: do not use, method only for api backwards compatibility - - Logs a warning and calls ConverseService.activate_skill - - Args: - skill_id (str): identifier of skill to be added. - """ - # NOTE: can not delete method for backwards compat with upstream - LOG.warning("self.add_active_skill has been deprecated!\n" - "use self.converse.activate_skill instead") - self.converse.activate_skill(skill_id) - - def send_metrics(self, intent, context, stopwatch): - """Send timing metrics to the backend. - - NOTE: This only applies to those with Opt In. - - Args: - intent (IntentMatch or None): intet match info - context (dict): context info about the interaction - stopwatch (StopWatch): Timing info about the skill parsing. - """ - ident = context['ident'] if 'ident' in context else None - # Determine what handled the intent - if intent and intent.intent_service == 'Converse': - intent_type = f'{intent.skill_id}:converse' - elif intent and intent.intent_service == 'Fallback': - intent_type = 'fallback' - elif intent and intent.intent_service == 'CommonQuery': - intent_type = 'common_qa' - elif intent: # Handled by an other intent parser - # Recreate skill name from skill id - parts = intent.intent_type.split(':') - intent_type = self.get_skill_name(parts[0]) - if len(parts) > 1: - intent_type = ':'.join([intent_type] + parts[1:]) - else: # No intent was found - intent_type = 'intent_failure' - - report_timing(ident, 'intent_service', stopwatch, - {'intent_type': intent_type}) - - def handle_utterance(self, message): - """Main entrypoint for handling user utterances with Mycroft skills - - Monitor the messagebus for 'recognizer_loop:utterance', typically - generated by a spoken interaction but potentially also from a CLI - or other method of injecting a 'user utterance' into the system. - - Utterances then work through this sequence to be handled: - 1) Active skills attempt to handle using converse() - 2) Padatious high match intents (conf > 0.95) - 3) Adapt intent handlers - 5) CommonQuery Skills - 6) High Priority Fallbacks - 7) Padatious near match intents (conf > 0.8) - 8) General Fallbacks - 9) Padatious loose match intents (conf > 0.5) - 10) Catch all fallbacks including Unknown intent handler - - If all these fail the complete_intent_failure message will be sent - and a generic info of the failure will be spoken. - - Args: - message (Message): The messagebus data - """ - try: - match, message.context, stopwatch = super().handle_utterance(message) - self.send_metrics(match, message.context, stopwatch) - except Exception as err: - pass diff --git a/mycroft/skills/intent_service_interface.py b/mycroft/skills/intent_service_interface.py deleted file mode 100644 index 674fa8a57e2a..000000000000 --- a/mycroft/skills/intent_service_interface.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2018 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""The intent service interface offers a unified wrapper class for the -Intent Service. Including both adapt and padatious. -""" -from ovos_workshop.intents import IntentServiceInterface, open_intent_envelope - diff --git a/mycroft/skills/intent_services/__init__.py b/mycroft/skills/intent_services/__init__.py deleted file mode 100644 index 8a0355a5d175..000000000000 --- a/mycroft/skills/intent_services/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -from ovos_core.intent_services import AdaptService,\ - ConverseService, \ - CommonQAService, \ - FallbackService, \ - PadaciosoService -from ovos_core.intent_services import IntentMatch -from mycroft.skills.intent_services.adapt_service import AdaptIntent, IntentBuilder, Intent - -try: - from ovos_core.intent_services.padatious_service import PadatiousService, PadatiousMatcher -except ImportError: - from ovos_utils.log import LOG - LOG.warning("padatious not installed") - from ovos_core.intent_services.padacioso_service import PadaciosoService as PadatiousService diff --git a/mycroft/skills/intent_services/adapt_service.py b/mycroft/skills/intent_services/adapt_service.py deleted file mode 100644 index fa8ac0881abc..000000000000 --- a/mycroft/skills/intent_services/adapt_service.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2020 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""An intent parsing service using the Adapt parser.""" -from ovos_adapt.context import ContextManagerFrame -from ovos_adapt.engine import IntentDeterminationEngine -from ovos_workshop.intents import IntentBuilder, Intent -from ovos_adapt.opm import ContextManager, AdaptPipeline as AdaptService - - -class AdaptIntent(IntentBuilder): - def __init__(self, name=''): - super().__init__(name) diff --git a/mycroft/skills/intent_services/base.py b/mycroft/skills/intent_services/base.py deleted file mode 100644 index 9c21692d93f5..000000000000 --- a/mycroft/skills/intent_services/base.py +++ /dev/null @@ -1,11 +0,0 @@ -from collections import namedtuple - -# Intent match response tuple containing -# intent_service: Name of the service that matched the intent -# intent_type: intent name (used to call intent handler over the message bus) -# intent_data: data provided by the intent match -# skill_id: the skill this handler belongs to -IntentMatch = namedtuple('IntentMatch', - ['intent_service', 'intent_type', - 'intent_data', 'skill_id'] - ) diff --git a/mycroft/skills/intent_services/commonqa_service.py b/mycroft/skills/intent_services/commonqa_service.py deleted file mode 100644 index 34f5ac1c7fe6..000000000000 --- a/mycroft/skills/intent_services/commonqa_service.py +++ /dev/null @@ -1,2 +0,0 @@ -from ovos_core.intent_services.commonqa_service import CommonQAService -EXTENSION_TIME = 10 diff --git a/mycroft/skills/intent_services/converse_service.py b/mycroft/skills/intent_services/converse_service.py deleted file mode 100644 index 5077d90cfc8a..000000000000 --- a/mycroft/skills/intent_services/converse_service.py +++ /dev/null @@ -1,2 +0,0 @@ -from ovos_core.intent_services.converse_service import ConverseService, ConverseActivationMode, ConverseMode - diff --git a/mycroft/skills/intent_services/fallback_service.py b/mycroft/skills/intent_services/fallback_service.py deleted file mode 100644 index 9bdd475fc6ad..000000000000 --- a/mycroft/skills/intent_services/fallback_service.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2020 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Intent service for Mycroft's fallback system.""" -from ovos_core.intent_services.fallback_service import FallbackRange, FallbackService - diff --git a/mycroft/skills/intent_services/padatious_service.py b/mycroft/skills/intent_services/padatious_service.py deleted file mode 100644 index b5d1809a4312..000000000000 --- a/mycroft/skills/intent_services/padatious_service.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2020 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Intent service wrapping padatious.""" -from ovos_core.intent_services.padatious_service import PadatiousMatcher, PadatiousService, PadatiousIntent - diff --git a/mycroft/skills/msm_wrapper.py b/mycroft/skills/msm_wrapper.py deleted file mode 100644 index d9bd09978f1e..000000000000 --- a/mycroft/skills/msm_wrapper.py +++ /dev/null @@ -1,8 +0,0 @@ -""" -NOTE: this is dead code! do not use! -This file is only present to ensure backwards compatibility -in case someone is importing from here -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" -from mycroft.deprecated.skills.msm_wrapper import * diff --git a/mycroft/skills/mycroft_skill/__init__.py b/mycroft/skills/mycroft_skill/__init__.py deleted file mode 100644 index baee0f9e2c6a..000000000000 --- a/mycroft/skills/mycroft_skill/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from ovos_workshop.skills.ovos import OVOSSkill as MycroftSkill -from ovos_utils.events import get_handler_name -from mycroft.skills.mycroft_skill.decorators import (intent_handler, - intent_file_handler, - resting_screen_handler, - skill_api_method) diff --git a/mycroft/skills/mycroft_skill/decorators.py b/mycroft/skills/mycroft_skill/decorators.py deleted file mode 100644 index adda2c23fb34..000000000000 --- a/mycroft/skills/mycroft_skill/decorators.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat -from ovos_workshop.decorators import intent_handler, intent_file_handler, resting_screen_handler, skill_api_method diff --git a/mycroft/skills/mycroft_skill/event_container.py b/mycroft/skills/mycroft_skill/event_container.py deleted file mode 100644 index 334d76aa6f41..000000000000 --- a/mycroft/skills/mycroft_skill/event_container.py +++ /dev/null @@ -1,2 +0,0 @@ -# Deprecated - the utils here are now part of ovos_utils -from ovos_utils.events import unmunge_message, get_handler_name, create_wrapper, create_basic_wrapper, EventContainer diff --git a/mycroft/skills/mycroft_skill/mycroft_skill.py b/mycroft/skills/mycroft_skill/mycroft_skill.py deleted file mode 100644 index 350b8e7b867b..000000000000 --- a/mycroft/skills/mycroft_skill/mycroft_skill.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Common functionality relating to the implementation of mycroft skills.""" - -# backwards compat imports, do not delete! -from ovos_workshop.intents import Intent, IntentBuilder, IntentServiceInterface, to_alnum -from ovos_utils.skills import get_non_properties -from ovos_workshop.skills.ovos import SkillGUI -from ovos_bus_client.message import Message, dig_for_message -from mycroft.metrics import report_metric -from ovos_bus_client.util.scheduler import EventScheduler, EventSchedulerInterface -from ovos_utils.events import get_handler_name, create_wrapper, EventContainer -from ovos_bus_client.apis.enclosure import EnclosureAPI -from ovos_bus_client.util import get_message_lang - -from mycroft.deprecated.skills import ( - read_vocab_file, read_value_file, read_translated_file, - load_vocabulary, load_regex) -from mycroft.deprecated.skills.settings import SettingsMetaUploader -from ovos_workshop.skills.ovos import OVOSSkill as MycroftSkill diff --git a/mycroft/skills/permissions.py b/mycroft/skills/permissions.py deleted file mode 100644 index 6429df9cc41e..000000000000 --- a/mycroft/skills/permissions.py +++ /dev/null @@ -1 +0,0 @@ -from ovos_workshop.permissions import FallbackMode, ConverseMode, ConverseActivationMode diff --git a/mycroft/skills/settings.py b/mycroft/skills/settings.py deleted file mode 100644 index b8d6fe218afa..000000000000 --- a/mycroft/skills/settings.py +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Keep the settingsmeta.json and settings.json files in sync with the backend. - -The SkillSettingsMeta and SkillSettings classes run a synchronization every -minute to ensure the device and the server have the same values. - -The settingsmeta.json file (or settingsmeta.yaml, if you prefer working with -yaml) in the skill's root directory contains instructions for the Selene UI on -how to display and update a skill's settings, if there are any. - -For example, you might have a setting named "username". In the settingsmeta -you can describe the interface to edit that value with: - ... - "fields": [ - { - "name": "username", - "type": "email", - "label": "Email address to associate", - "placeholder": "example@mail.com", - "value": "" - } - ] - ... - -When the user changes the setting via the web UI, it will be sent down to all -the devices related to an account and automatically placed into -settings['username']. Any local changes made to the value (e.g. via a verbal -interaction) will also be synchronized to the server to show on the web -interface. - -The settings.json file contains name/value pairs for each setting. There can -be entries in settings.json that are not related to those the user can -manipulate on the web. There is logic in the SkillSettings class to ensure -these "hidden" settings are not affected when the synchronization occurs. A -skill can define a function that will be called when any settings change. - -SkillSettings Usage Example: - from mycroft.skill.settings import SkillSettings - - s = SkillSettings('./settings.json', 'ImportantSettings') - s.skill_settings['meaning of life'] = 42 - s.skill_settings['flower pot sayings'] = 'Not again...' - s.save_settings() # This happens automagically in a MycroftSkill -""" -import json -from os.path import isfile -import yaml - -from threading import Timer -from ovos_backend_client.api import DeviceApi -from ovos_backend_client.pairing import is_paired, requires_backend -from ovos_utils.log import LOG -from ovos_backend_client.settings import RemoteSkillSettings, get_display_name -from ovos_bus_client.message import Message, dig_for_message - -# backwards compat imports -from mycroft.deprecated.skills.settings import SkillSettingsDownloader, SettingsMetaUploader, load_remote_settings_cache, \ - save_remote_settings_cache, REMOTE_CACHE - -from ovos_workshop.settings import SkillSettingsManager diff --git a/mycroft/skills/skill_data.py b/mycroft/skills/skill_data.py deleted file mode 100644 index 8e54ca73467a..000000000000 --- a/mycroft/skills/skill_data.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2018 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Handling of skill data such as intents and regular expressions.""" -# backwards compat imports, do not delete -from ovos_workshop.intents import munge_intent_parser -from ovos_workshop.resource_files import SkillResourceTypes, ResourceType, ResourceFile, \ - QmlFile, DialogFile, VocabularyFile, NamedValueFile, ListFile, TemplateFile, RegexFile, WordFile, \ - CoreResources, UserResources, SkillResources, RegexExtractor, locate_base_directories, \ - locate_lang_directories, find_resource -from mycroft.deprecated.skills import ( - read_value_file, read_translated_file, read_vocab_file, - load_vocabulary, load_regex, load_regex_from_file, to_alnum, - munge_regex -) diff --git a/mycroft/skills/skill_loader.py b/mycroft/skills/skill_loader.py deleted file mode 100644 index 95d9bfaeb98c..000000000000 --- a/mycroft/skills/skill_loader.py +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright 2019 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Periodically run by skill manager to load skills into memory.""" -import os -from time import time -from ovos_utils.log import LOG - -# backwards compat imports do not delete -from mycroft.deprecated.skills.settings import SettingsMetaUploader -from ovos_plugin_manager.skills import find_skill_plugins, get_default_skills_directory -from ovos_workshop.skill_launcher import SKILL_MAIN_MODULE, get_skill_directories,\ - remove_submodule_refs, load_skill_module, get_skill_class, \ - get_create_skill_function, SkillLoader as _SL, PluginSkillLoader as _PSL - - -def _bad_mod_times(mod_times): - """Return all entries with modification time in the future. - - Args: - mod_times (dict): dict mapping file paths to modification times. - - Returns: - List of files with bad modification times. - """ - current_time = time() - return [path for path in mod_times if mod_times[path] > current_time] - - -def _get_last_modified_time(path): - """Get the last modified date of the most recently updated file in a path. - - Exclude compiled python files, hidden directories and the settings.json - file. - - Args: - path: skill directory to check - - Returns: - int: time of last change - """ - all_files = [] - for root_dir, dirs, files in os.walk(path): - dirs[:] = [d for d in dirs if not d.startswith('.')] - for f in files: - ignore_file = ( - f.endswith('.pyc') or - f == 'settings.json' or - f.startswith('.') or - f.endswith('.qmlc') - ) - if not ignore_file: - all_files.append(os.path.join(root_dir, f)) - - # check files of interest in the skill root directory - mod_times = {f: os.path.getmtime(f) for f in all_files} - # Ensure modification times are valid - bad_times = _bad_mod_times(mod_times) - if bad_times: - raise OSError(f'{bad_times} had bad modification times') - if all_files: - return max(os.path.getmtime(f) for f in all_files) - else: - return 0 - - -class SkillLoader(_SL): - def __init__(self, bus, skill_directory=None): - super().__init__(bus, skill_directory) - self.last_modified = 0 - self.modtime_error_log_written = False - - def _handle_filechange(self, path): - super()._handle_filechange(path) - # NOTE: below could be removed, but is kept for api backwards compatibility - # users of SkillLoader will still have all properties properly updated - # TODO on ntp sync last_modified needs to be updated - try: - self.last_modified = _get_last_modified_time(self.skill_directory) - except OSError as err: - self.last_modified = self.last_loaded - if not self.modtime_error_log_written: - self.modtime_error_log_written = True - LOG.error(f'Failed to get last_modification time ({err})') - else: - self.modtime_error_log_written = False - - def reload_needed(self): - """DEPRECATED: backwards compatibility only - - this is now event based and always returns False after initial load - """ - return self.instance is None - - -class PluginSkillLoader(SkillLoader, _PSL): - - def reload_needed(self): - return False diff --git a/mycroft/skills/skill_manager.py b/mycroft/skills/skill_manager.py deleted file mode 100644 index 51b0eff80e29..000000000000 --- a/mycroft/skills/skill_manager.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Load, update and manage skills on this device.""" -from ovos_backend_client.pairing import is_paired -from mycroft.deprecated.skills.settings import UploadQueue, SkillSettingsDownloader -from mycroft.deprecated.skills.skill_updater import SkillUpdater -from mycroft.skills.skill_updater import SeleneSkillManifestUploader -from ovos_core.skill_manager import SkillManager as _SM -from ovos_utils.log import LOG -# do not delete - backwards compat imports -from ovos_utils.process_utils import ProcessState -from ovos_core.skill_manager import on_error, on_stopping, on_ready, on_alive, on_started -from ovos_workshop.skill_launcher import SKILL_MAIN_MODULE -from ovos_workshop.skill_launcher import get_skill_directories, SkillLoader, PluginSkillLoader - - -class SkillManager(_SM): - - def __init__(self, *args, **kwargs): - self.manifest_uploader = SeleneSkillManifestUploader() - self.upload_queue = UploadQueue() # DEPRECATED - super().__init__(*args, **kwargs) - - @property - def msm(self): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns None - """ - LOG.warning("msm has been deprecated!") - return None - - @property - def settings_downloader(self): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns None - """ - LOG.warning("settings_downloader has been deprecated, " - "it is now managed at skill level") - return SkillSettingsDownloader(self.bus) - - @property - def skill_updater(self): - LOG.warning("SkillUpdater has been deprecated! Please use self.manifest_uploader instead") - return SkillUpdater() - - @staticmethod - def create_msm(): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning and returns None - """ - return None - - def schedule_now(self, _): - """DEPRECATED: do not use, method only for api backwards compatibility - Logs a warning - """ - - def handle_paired(self, _): - """DEPRECATED: do not use, method only for api backwards compatibility - upload of settings is done at individual skill level in ovos-core """ - pass - - def handle_internet_connected(self, message): - super().handle_internet_connected(message) - - # Sync backend and skills. - # why does selene need to know about skills without settings? - if is_paired(): - self.manifest_uploader.post_manifest() - - - - - - - def _unload_removed_skills(self): - removed_skills = super()._unload_removed_skills() - # If skills were removed make sure to update the manifest on the - # mycroft backend. - if removed_skills and self._connected_event.is_set(): - self.manifest_uploader.post_manifest(reload_skills_manifest=True) - - - def stop(self): - """Tell the manager to shutdown.""" - super().stop() - self.upload_queue.stop() - diff --git a/mycroft/skills/skill_updater.py b/mycroft/skills/skill_updater.py deleted file mode 100644 index fe32a57500bc..000000000000 --- a/mycroft/skills/skill_updater.py +++ /dev/null @@ -1,35 +0,0 @@ -from ovos_backend_client.api import DeviceApi -from ovos_backend_client.pairing import is_paired -from ovos_utils.log import LOG -from ovos_backend_client.settings import SeleneSkillsManifest -from ovos_config import Configuration -# backwards compat import - do not delete -from mycroft.deprecated.skills.skill_updater import SkillUpdater - - -class SeleneSkillManifestUploader: - """Class facilitating skill manifest upload.""" - - def __init__(self): - super().__init__() - self.api = DeviceApi() - self.config = Configuration() - self.skill_manifest = SeleneSkillsManifest(self.api) - self.post_manifest(True) - - @property - def installed_skills_file_path(self): - """Property representing the path of the installed skills file.""" - return self.skill_manifest.path - - def post_manifest(self, reload_skills_manifest=False): - """Post the manifest of the device's skills to the backend.""" - upload_allowed = self.config['skills'].get('upload_skill_manifest') - if upload_allowed and is_paired(): - if reload_skills_manifest: - self.skill_manifest.clear() - self.skill_manifest.scan_skills() - try: - self.api.upload_skills_data(self.skill_manifest) - except Exception: - LOG.error('Could not upload skill manifest') diff --git a/mycroft/stt/__init__.py b/mycroft/stt/__init__.py deleted file mode 100644 index 476dce5846e4..000000000000 --- a/mycroft/stt/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -""" -This module contains back compat imports only -logic moved into mycroft.audio module and ovos plugin manager -""" -from mycroft.deprecated.stt import STTFactory, STT, StreamingSTT, StreamThread, \ - KeySTT, TokenSTT, BasicSTT, MycroftSTT, GoogleJsonSTT diff --git a/mycroft/tts/__init__.py b/mycroft/tts/__init__.py deleted file mode 100644 index eb12275e49ba..000000000000 --- a/mycroft/tts/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -""" -NOTE: this is dead code! do not use! -This file is only present to ensure backwards compatibility -in case someone is importing from here -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" -from ovos_audio.tts import TTSFactory, OVOSTTSFactory -from ovos_plugin_manager.templates.tts import TTS, RemoteTTS -from ovos_plugin_manager.templates.tts import PlaybackThread, \ - TTS, TTSValidator, EMPTY_PLAYBACK_QUEUE_TUPLE diff --git a/mycroft/tts/cache.py b/mycroft/tts/cache.py deleted file mode 100644 index b3235cbf8b23..000000000000 --- a/mycroft/tts/cache.py +++ /dev/null @@ -1,9 +0,0 @@ -""" -NOTE: this is dead code! do not use! -This file is only present to ensure backwards compatibility -in case someone is importing from here -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" -from ovos_plugin_manager.utils.tts_cache import hash_sentence, hash_from_path, \ - AudioFile, PhonemeFile, TextToSpeechCache diff --git a/mycroft/tts/remote_tts.py b/mycroft/tts/remote_tts.py deleted file mode 100644 index c2a5f1468070..000000000000 --- a/mycroft/tts/remote_tts.py +++ /dev/null @@ -1,9 +0,0 @@ -""" -NOTE: this is dead code! do not use! -This file is only present to ensure backwards compatibility -in case someone is importing from here -This is only meant for 3rd party code expecting ovos-core -to be a drop in replacement for mycroft-core -""" -from ovos_plugin_manager.templates.tts import RemoteTTS, \ - RemoteTTSException, RemoteTTSTimeoutException diff --git a/mycroft/tts/tts.py b/mycroft/tts/tts.py deleted file mode 100644 index b6af6f749d50..000000000000 --- a/mycroft/tts/tts.py +++ /dev/null @@ -1,7 +0,0 @@ -""" -This module contains back compat imports only -logic moved into mycroft.audio module and ovos plugin manager -""" -from ovos_audio.tts import TTSFactory, OVOSTTSFactory -from ovos_plugin_manager.templates.tts import PlaybackThread, \ - TTS, TTSValidator, EMPTY_PLAYBACK_QUEUE_TUPLE diff --git a/mycroft/util/__init__.py b/mycroft/util/__init__.py deleted file mode 100644 index f78ddaf4a426..000000000000 --- a/mycroft/util/__init__.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Mycroft util library. - -A collections of utils and tools for making skill development easier. -""" -from __future__ import absolute_import - -from ovos_utils import camel_case_split -from ovos_utils.sound import play_audio as play_ogg, play_audio as play_mp3, play_audio as play_wav -from mycroft.util.audio_utils import (play_audio_file, find_input_device) -from mycroft.util.file_utils import ( - read_stripped_lines, - read_dict, - create_file, - ensure_directory_exists, - curate_cache) -from ovos_utils.file_utils import resolve_resource_file, get_cache_directory, get_temp_path -from mycroft.util.network_utils import connected -from mycroft.util.process_utils import (create_echo_function, - start_message_bus_client) - -from ovos_utils import wait_for_exit_signal, create_daemon -from ovos_utils.process_utils import reset_sigint_handler - -from mycroft.util.parse import extract_datetime, extract_number, normalize -from ovos_utils.signal import check_for_signal, create_signal, \ - get_ipc_directory -from mycroft.util.platform import get_arch -from ovos_utils.log import init_service_logger, LOG - - -def record(*args, **kwargs): - from mycroft.util.audio_test import record - record(*args, **kwargs) diff --git a/mycroft/util/audio_test.py b/mycroft/util/audio_test.py deleted file mode 100644 index d7a4ccebec2e..000000000000 --- a/mycroft/util/audio_test.py +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import argparse -import os -import pyaudio -from contextlib import contextmanager - -from speech_recognition import Recognizer - -from ovos_listener.mic import MutableMicrophone -from ovos_config.config import Configuration -from ovos_utils.sound import play_audio as play_wav -from mycroft.util.audio_utils import find_input_device -from ovos_utils.log import LOG -import logging -from ovos_utils.file_utils import get_temp_path - -""" -Audio Test -A tool for recording X seconds of audio, and then playing them back. Useful -for testing hardware, and ensures -compatibility with mycroft recognizer loop code. -""" - -# Reduce loglevel -LOG.level = 'ERROR' -logging.getLogger('urllib3').setLevel(logging.WARNING) - - -@contextmanager -def mute_output(): - """ Context manager blocking stdout and stderr completely. - - Redirects stdout and stderr to dev-null and restores them on exit. - """ - # Open a pair of null files - null_fds = [os.open(os.devnull, os.O_RDWR) for i in range(2)] - # Save the actual stdout (1) and stderr (2) file descriptors. - orig_fds = [os.dup(1), os.dup(2)] - # Assign the null pointers to stdout and stderr. - os.dup2(null_fds[0], 1) - os.dup2(null_fds[1], 2) - try: - yield - finally: - # Re-assign the real stdout/stderr back to (1) and (2) - os.dup2(orig_fds[0], 1) - os.dup2(orig_fds[1], 2) - for fd in null_fds + orig_fds: - os.close(fd) - - -def record(filename, duration, device_index=None, sample_rate=16000): - mic = MutableMicrophone(device_index, sample_rate) - recognizer = Recognizer() - with mic as source: - audio = recognizer.record(source, duration=duration) - with open(filename, 'wb') as f: - f.write(audio.get_wav_data()) - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument( - '-f', - '--filename', - dest='filename', - default=get_temp_path('test.wav'), - help="Filename for saved audio (Default:{}".format( - get_temp_path('test.wav'))) - parser.add_argument( - '-d', '--duration', dest='duration', type=int, default=10, - help="Duration of recording in seconds (Default: 10)") - parser.add_argument( - '-v', '--verbose', dest='verbose', action='store_true', default=False, - help="Add extra output regarding the recording") - parser.add_argument( - '-l', '--list', dest='show_devices', action='store_true', - default=False, help="List all availabile input devices") - args = parser.parse_args() - - if args.show_devices: - print(" Initializing... ") - pa = pyaudio.PyAudio() - - print(" ====================== Audio Devices ======================") - print(" Index Device Name") - for device_index in range(pa.get_device_count()): - dev = pa.get_device_info_by_index(device_index) - if dev['maxInputChannels'] > 0: - print(f' {device_index}: {dev["name"]}') - print() - - config = Configuration() - device_index = None - if "device_name" in config["listener"]: - dev = config["listener"]["device_name"] - device_index = find_input_device(dev) - if not device_index: - raise ValueError(f"Device with name {dev} not found, check your configuration") - dev += f" (index {device_index})" - elif "device_index" in config["listener"]: - dev = f"Device at index {config['listener']['device_index']}" - device_index = int(config["listener"]["device_index"]) - else: - dev = "Default device" - sample_rate = config["listener"]["sample_rate"] - play_cmd = config["play_wav_cmdline"].replace("%1", "WAV_FILE") - - print(" ========================== Info ===========================") - print(f" Input device: {dev} @ Sample rate: {sample_rate} Hz") - print(f" Playback commandline: {play_cmd}") - print() - print(" ===========================================================") - print(" == STARTING TO RECORD, MAKE SOME NOISE! ==") - print(" ===========================================================") - - if not args.verbose: - with mute_output(): - record(args.filename, args.duration, device_index=device_index, sample_rate=sample_rate) - else: - record(args.filename, args.duration, device_index=device_index, sample_rate=sample_rate) - - print(" ===========================================================") - print(" == DONE RECORDING, PLAYING BACK... ==") - print(" ===========================================================") - status = play_wav(args.filename).wait() - if status: - print(f'An error occured while playing back audio ({status})') - - -if __name__ == "__main__": - main() diff --git a/mycroft/util/audio_utils.py b/mycroft/util/audio_utils.py deleted file mode 100644 index cf78f832c25a..000000000000 --- a/mycroft/util/audio_utils.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 2020 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Contains simple tools for performing audio related tasks such as playback -of audio, recording and listing devices. -""" -import re -from ovos_utils.log import LOG -from ovos_utils.sound import play_audio -try: - import pyaudio -except ImportError: - pyaudio = None - - -def play_audio_file(uri: str, environment=None): - """Play an audio file. - - This wraps the other play_* functions, choosing the correct one based on - the file extension. The function will return directly and play the file - in the background. - - Args: - uri: uri to play - environment (dict): optional environment for the subprocess call - - Returns: subprocess.Popen object. None if the format is not supported or - an error occurs playing the file. - """ - return play_audio(uri, environment=environment) - - -def play_wav(uri, environment=None): - """Play a wav-file. - - This will use the application specified in the mycroft config - and play the uri passed as argument. The function will return directly - and play the file in the background. - - Args: - uri: uri to play - environment (dict): optional environment for the subprocess call - - Returns: subprocess.Popen object or None if operation failed - """ - return play_audio(uri, environment=environment) - - -def play_mp3(uri, environment=None): - """Play a mp3-file. - - This will use the application specified in the mycroft config - and play the uri passed as argument. The function will return directly - and play the file in the background. - - Args: - uri: uri to play - environment (dict): optional environment for the subprocess call - - Returns: subprocess.Popen object or None if operation failed - """ - return play_audio(uri, environment=environment) - - -def play_ogg(uri, environment=None): - """Play an ogg-file. - - This will use the application specified in the mycroft config - and play the uri passed as argument. The function will return directly - and play the file in the background. - - Args: - uri: uri to play - environment (dict): optional environment for the subprocess call - - Returns: subprocess.Popen object, or None if operation failed - """ - return play_audio(uri, environment=environment) - - -def find_input_device(device_name): - """Find audio input device by name. - - Args: - device_name: device name or regex pattern to match - - Returns: device_index (int) or None if device wasn't found - """ - if pyaudio is None: - raise ImportError("pyaudio not installed") - LOG.info('Searching for input device: {}'.format(device_name)) - LOG.debug('Devices: ') - pa = pyaudio.PyAudio() - pattern = re.compile(device_name) - for device_index in range(pa.get_device_count()): - dev = pa.get_device_info_by_index(device_index) - LOG.debug(' {}'.format(dev['name'])) - if dev['maxInputChannels'] > 0 and pattern.match(dev['name']): - LOG.debug(' ^-- matched') - return device_index - return None diff --git a/mycroft/util/bracket_expansion.py b/mycroft/util/bracket_expansion.py deleted file mode 100644 index 47bfcc1626e9..000000000000 --- a/mycroft/util/bracket_expansion.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat import for mycroft-core -# this code is maintained as part of ovos_utils -from ovos_utils.bracket_expansion import expand_options, expand_parentheses diff --git a/mycroft/util/combo_lock.py b/mycroft/util/combo_lock.py deleted file mode 100644 index 76a7df24ad3b..000000000000 --- a/mycroft/util/combo_lock.py +++ /dev/null @@ -1,2 +0,0 @@ -# backwards compat import, now a standalone package https://github.com/forslund/combo-lock -from combo_lock import ComboLock diff --git a/mycroft/util/download.py b/mycroft/util/download.py deleted file mode 100644 index 74fe555da99a..000000000000 --- a/mycroft/util/download.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Download utility based on wget. - -The utility is a real simple implementation leveraging the wget command line -application supporting resume on failed download. -""" -from glob import glob -import os -from os.path import exists, dirname -import subprocess -from threading import Thread - -from mycroft.util.file_utils import ensure_directory_exists - -_running_downloads = {} # Cache of running downloads - - -def _get_download_tmp(dest): - """Get temporary file for download. - - Args: - dest (str): path to download location - - Returns: - (str) path to temporary download location - """ - tmp_base = dest + '.part' - existing = glob(tmp_base + '*') - if len(existing) > 0: - return '{}.{}'.format(tmp_base, len(existing)) - else: - return tmp_base - - -class Downloader(Thread): - """Simple file downloader. - - Downloader is a thread based downloader instance when instanciated - it will download the provided url to a file on disk. - - When the download is complete or failed the `.done` property will - be set to true and the `.status` will indicate the HTTP status code. - 200 = Success. - - Args: - url (str): Url to download - dest (str): Path to save data to - complete_action (callable): Function to run when download is complete - `func(dest)` - header: any special header needed for starting the transfer - """ - - def __init__(self, url, dest, complete_action=None, header=None): - super(Downloader, self).__init__() - self.url = url - self.dest = dest - self.complete_action = complete_action - self.status = None - self.done = False - self._abort = False - self.header = header - - # Create directories as needed - ensure_directory_exists(dirname(dest), permissions=0o775) - - # Start thread - self.daemon = True - self.start() - - def perform_download(self, dest): - """Handle the download through wget. - - Args: - dest (str): Save location - """ - cmd = ['wget', '-c', self.url, '-O', dest, - '--tries=20', '--read-timeout=5'] - if self.header: - cmd += ['--header={}'.format(self.header)] - return subprocess.call(cmd) - - def run(self): - """Do the actual download.""" - tmp = _get_download_tmp(self.dest) - self.status = self.perform_download(tmp) - if not self._abort and self.status == 0: - self.finalize(tmp) - else: - self.cleanup(tmp) - self.done = True - arg_hash = hash(self.url + self.dest) - - # Remove from list of currently running downloads - if arg_hash in _running_downloads: - _running_downloads.pop(arg_hash) - - def finalize(self, tmp): - """Move temporary download data to final location. - - Move the .part file to the final destination and perform any - actions that should be performed at completion. - - Args: - tmp(str): temporary file path - """ - os.rename(tmp, self.dest) - if self.complete_action: - self.complete_action(self.dest) - - def cleanup(self, tmp): - """Cleanup after download attempt.""" - if exists(tmp): - os.remove(self.dest + '.part') - if self.status == 200: - self.status = -1 - - def abort(self): - """Abort download process.""" - self._abort = True - - -def download(url, dest, complete_action=None, header=None): - """Start a download or fetch an already running. - - Args: - url (str): url to download - dest (str): path to save download to - complete_action (callable): Optional function to call on completion - header (str): Optional header to use for the download - - Returns: - Downloader object - """ - global _running_downloads - arg_hash = hash(url + dest) - if arg_hash not in _running_downloads: - _running_downloads[arg_hash] = Downloader(url, dest, complete_action, - header) - return _running_downloads[arg_hash] diff --git a/mycroft/util/file_utils.py b/mycroft/util/file_utils.py deleted file mode 100644 index 31856e86f62d..000000000000 --- a/mycroft/util/file_utils.py +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 2020 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Mycroft file utils. - -This module contains functions handling mycroft resource files and things like -accessing and curating mycroft's cache. -""" - -import os -from ovos_utils.log import LOG -# do not delete these imports, here for backwards compat! -from ovos_plugin_manager.utils.tts_cache import curate_cache, mb_to_bytes -from ovos_utils.file_utils import get_temp_path, resolve_resource_file, \ - FileWatcher, FileEventHandler, get_cache_directory - - -def read_stripped_lines(filename): - """Read a file and return a list of stripped lines. - - Args: - filename (str): path to file to read. - - Returns: - (list) list of lines stripped from leading and ending white chars. - """ - with open(filename, 'r') as f: - for line in f: - line = line.strip() - if line: - yield line - - -def read_dict(filename, div='='): - """Read file into dict. - - A file containing: - foo = bar - baz = bog - - results in a dict - { - 'foo': 'bar', - 'baz': 'bog' - } - - Args: - filename (str): path to file - div (str): deviders between dict keys and values - - Returns: - (dict) generated dictionary - """ - d = {} - with open(filename, 'r') as f: - for line in f: - key, val = line.split(div) - d[key.strip()] = val.strip() - return d - - -def ensure_directory_exists(directory, domain=None, permissions=0o777): - """Create a directory and give access rights to all - - Args: - directory (str): Root directory - domain (str): Domain. Basically a subdirectory to prevent things like - overlapping signal filenames. - rights (int): Directory permissions (default is 0o777) - - Returns: - (str) a path to the directory - """ - if domain: - directory = os.path.join(directory, domain) - - # Expand and normalize the path - directory = os.path.normpath(directory) - directory = os.path.expanduser(directory) - - if not os.path.isdir(directory): - try: - save = os.umask(0) - os.makedirs(directory, permissions) - except OSError: - LOG.warning("Failed to create: " + directory) - finally: - os.umask(save) - - return directory - - -def create_file(filename): - """Create the file filename and create any directories needed - - Args: - filename: Path to the file to be created - """ - ensure_directory_exists(os.path.dirname(filename), permissions=0o775) - with open(filename, 'w') as f: - f.write('') - os.chmod(filename, 0o777) - - - diff --git a/mycroft/util/format.py b/mycroft/util/format.py deleted file mode 100644 index 8b1e34bdc6b4..000000000000 --- a/mycroft/util/format.py +++ /dev/null @@ -1,402 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -""" -The mycroft.util.format module provides various formatting functions for -things like numbers, times, etc. - -The focus of these formatting functions is to create human digestible content -either as speech or in display form. It is also enables localization. - -The module uses lingua-franca (https://github.com/mycroftai/lingua-franca) to -do most of the actual parsing. However methods may be wrapped specifically for -use in Mycroft Skills. -""" -import datetime -import warnings -from ovos_config.locale import get_default_lang -from calendar import leapdays -from enum import Enum - -from ovos_utils.bracket_expansion import expand_parentheses, expand_options - -# lingua_franca is optional, individual skills may install it if they need -# to use it - -try: - # These are the main functions we are using lingua franca to provide - from lingua_franca.format import (NUMBER_TUPLE, DateTimeFormat, - join_list, - date_time_format, expand_options, - _translate_word, - nice_number, nice_time, - pronounce_number, - nice_date, nice_date_time, nice_year) -except ImportError: - def lingua_franca_error(*args, **kwargs): - raise ImportError("lingua_franca is not installed") - - - from ovos_utils.bracket_expansion import expand_options - - NUMBER_TUPLE, DateTimeFormat = None, None - - join_list = date_time_format = _translate_word = nice_number = \ - nice_time = pronounce_number = nice_date = nice_date_time = \ - nice_year = lingua_franca_error - - -class TimeResolution(Enum): - YEARS = 1 - DAYS = 2 - HOURS = 3 - MINUTES = 4 - SECONDS = 5 - MILLISECONDS = 6 - - -def _duration_handler(time1, lang=None, speech=True, *, time2=None, - use_years=True, clock=False, - resolution=TimeResolution.SECONDS): - """Convert duration in seconds to a nice spoken timespan. - - Used as a handler by nice_duration and nice_duration_dt. - - Accepts: - datetime.timedelta, or - seconds (int/float), or - 2 x datetime.datetime - - Examples: - time1 = 60 -> "1:00" or "one minute" - time1 = 163 -> "2:43" or "two minutes forty three seconds" - time1 = timedelta(seconds=120) -> "2:00" or "two minutes" - - time1 = datetime(2019, 3, 12), - time2 = datetime(2019, 1, 1) -> "seventy days" - - Args: - time1: int/float seconds, OR datetime.timedelta, OR datetime.datetime - time2 (datetime, optional): subtracted from time1 if time1 is datetime - lang (str, optional): a BCP-47 language code, None for default - speech (bool, opt): format output for speech (True) or display (False) - use_years (bool, opt): rtn years and days if True, total days if False - clock (bool, opt): always format output like digital clock (see below) - resolution (mycroft.util.format.TimeResolution, optional): lower bound - - mycroft.util.format.TimeResolution values: - TimeResolution.YEARS - TimeResolution.DAYS - TimeResolution.HOURS - TimeResolution.MINUTES - TimeResolution.SECONDS - TimeResolution.MILLISECONDS - NOTE: nice_duration will not produce milliseconds - unless that resolution is passed. - - NOTE: clock will produce digital clock-like output appropriate to - resolution. Has no effect on resolutions DAYS or YEARS. Only - applies to displayed output. - - Returns: - str: timespan as a string - """ - if not lang: - lang = get_default_lang() - _leapdays = 0 - _input_resolution = resolution - milliseconds = 0 - - type1 = type(time1) - - if time2: - type2 = type(time2) - if type1 is not type2: - raise Exception("nice_duration() can't combine data types: " - "{} and {}".format(type1, type2)) - elif type1 is datetime.datetime: - duration = time1 - time2 - _leapdays = (abs(leapdays(time1.year, time2.year))) - - # when operating on datetimes, refuse resolutions that - # would result in bunches of trailing zeroes - if all([time1.second == 0, time2.second == 0, - resolution.value >= TimeResolution.SECONDS.value]): - resolution = TimeResolution.MINUTES - if all([time1.minute == 0, time2.minute == 0, - resolution.value == TimeResolution.MINUTES.value]): - resolution = TimeResolution.HOURS - if all([time1.hour == 0, time2.hour == 0, - resolution.value == TimeResolution.HOURS.value]): - resolution = TimeResolution.DAYS - - else: - _tmp = warnings.formatwarning - warnings.formatwarning = lambda msg, * \ - args, **kwargs: "{}\n".format(msg) - warning = ("WARN: mycroft.util.format.nice_duration_dt() can't " - "subtract " + str(type1) + ". Ignoring 2nd " - "argument '" + str(time2) + "'.") - warnings.warn(warning) - warnings.formatwarning = _tmp - duration = time1 - else: - duration = time1 - - # Pull decimal portion of seconds, if present, to use for milliseconds - if isinstance(duration, float): - milliseconds = str(duration).split('.')[1] - if speech: - milliseconds = milliseconds[:2] - else: - milliseconds = milliseconds[:3] - milliseconds = float("0." + milliseconds) - - # Cast duration to datetime.timedelta for human-friendliness - if not isinstance(duration, datetime.timedelta): - duration = datetime.timedelta(seconds=duration) - - days = duration.days - if use_years: - days -= _leapdays if days > 365 else 0 - years = days // 365 - else: - years = 0 - days = days % 365 if years > 0 else days - - # We already stored milliseconds. Now we want the integer part. - seconds = duration.seconds - minutes = seconds // 60 - seconds %= 60 - hours = minutes // 60 - minutes %= 60 - - if speech: - out = "" - if years > 0: - out += pronounce_number(years, lang) + " " - out += _translate_word("year" if years == 1 else "years", lang) - - if days > 0 and resolution.value > TimeResolution.YEARS.value: - if out: - out += " " - out += pronounce_number(days, lang) + " " - out += _translate_word("day" if days == 1 else "days", lang) - - if hours > 0 and resolution.value > TimeResolution.DAYS.value: - if out: - out += " " - out += pronounce_number(hours, lang) + " " - out += _translate_word("hour" if hours == 1 else "hours", lang) - - if minutes > 0 and resolution.value > TimeResolution.HOURS.value: - if out: - out += " " - out += pronounce_number(minutes, lang) + " " - out += _translate_word("minute" if minutes == - 1 else "minutes", lang) - - if ((seconds > 0 and resolution.value >= - TimeResolution.SECONDS.value) or - (milliseconds > 0 and resolution.value == - TimeResolution.MILLISECONDS.value)): - - if resolution.value == TimeResolution.MILLISECONDS.value: - seconds += milliseconds - if out: - out += " " - # Throw "and" between minutes and seconds if duration < 1 hour - if len(out.split()) > 3 or seconds < 1: - out += _translate_word("and", lang) + " " - # speaking "zero point five seconds" is better than "point five" - out += pronounce_number(seconds, lang) + " " - out += _translate_word("second" if seconds == - 1 else "seconds", lang) - - else: - # M:SS, MM:SS, H:MM:SS, Dd H:MM:SS format - - _seconds_str = ("0" + str(seconds)) if seconds < 10 else str(seconds) - - out = "" - if years > 0: - out = str(years) + "y " - if days > 0 and resolution.value > TimeResolution.YEARS.value: - out += str(days) + "d " - if (hours > 0 and resolution.value > TimeResolution.DAYS.value) or \ - (clock and resolution is TimeResolution.HOURS): - out += str(hours) - - if resolution.value == TimeResolution.MINUTES.value and not clock: - out += (("h " + str(minutes) + "m") if hours > 0 - else str(minutes) + "m") - elif (minutes > 0 and resolution.value > TimeResolution.HOURS.value) \ - or (clock and resolution.value >= TimeResolution.HOURS.value): - if hours != 0 or (clock and resolution is TimeResolution.HOURS): - out += ":" - if minutes < 10: - out += "0" - out += str(minutes) + ":" - if (seconds > 0 and resolution.value > - TimeResolution.MINUTES.value) or clock: - out += _seconds_str - else: - out += "00" - # if we have seconds but no minutes... - elif (seconds > 0 or clock) and resolution.value > \ - TimeResolution.MINUTES.value: - # check if output ends in hours - try: - if str(hours) == out.split()[-1]: - out += ":" - except IndexError: - pass - out += ("00:" if hours > 0 else "0:") + _seconds_str - - if (milliseconds > 0 or clock) and resolution.value \ - == TimeResolution.MILLISECONDS.value: - _mill = str(milliseconds).split(".")[1] - # right-pad milliseconds to three decimal places - while len(_mill) < 3: - _mill += "0" - # make sure output < 1s still formats correctly - if out == "": - out = "0:00" - else: - if (str(hours) == out.split()[-1]) and ":" not in out: - out += ":00:00" - # only append milliseconds to output that contains - # minutes and/or seconds - if ":" in out: - out += "." + _mill - - # If this evaluates True, out currently ends in hours: "1d 12" - if out and all([resolution.value >= TimeResolution.HOURS.value, - ":" not in out, out[-1] != "m", hours > 0]): - # to "1d 12h" - out += "h" - out = out.strip() - - if not out: - out = "zero " if speech else "0" - if _input_resolution == TimeResolution.YEARS: - out += "years" if speech else "y" - elif _input_resolution == TimeResolution.DAYS: - out += "days" if speech else "d" - elif _input_resolution == TimeResolution.HOURS: - out += "hours" if speech else "h" - elif _input_resolution == TimeResolution.MINUTES: - if speech: - out = "under a minute" if seconds > 0 else "zero minutes" - else: - out = "0m" - else: - out = "zero seconds" if speech else "0:00" - - return out - - -def nice_duration(duration, lang=None, speech=True, use_years=True, - clock=False, resolution=TimeResolution.SECONDS): - """ Convert duration in seconds to a nice spoken timespan - - Accepts: - time, in seconds, or datetime.timedelta - - Examples: - duration = 60 -> "1:00" or "one minute" - duration = 163 -> "2:43" or "two minutes forty three seconds" - duration = timedelta(seconds=120) -> "2:00" or "two minutes" - - Args: - duration (int/float/datetime.timedelta) - lang (str, optional): a BCP-47 language code, None for default - speech (bool, opt): format output for speech (True) or display (False) - use_years (bool, opt): rtn years and days if True, total days if False - clock (bool, opt): always format output like digital clock (see below) - resolution (mycroft.util.format.TimeResolution, optional): lower bound - - mycroft.util.format.TimeResolution values: - TimeResolution.YEARS - TimeResolution.DAYS - TimeResolution.HOURS - TimeResolution.MINUTES - TimeResolution.SECONDS - TimeResolution.MILLISECONDS - - NOTE: nice_duration will not produce milliseconds - unless that resolution is passed. - - NOTE: clock will produce digital clock-like output appropriate to - resolution. Has no effect on resolutions DAYS or YEARS. Only - applies to displayed output. - - Returns: - str: timespan as a string - """ - return _duration_handler(duration, lang=lang, speech=speech, - use_years=use_years, resolution=resolution, - clock=clock) - - -def nice_duration_dt(date1, date2, lang=None, speech=True, use_years=True, - clock=False, resolution=TimeResolution.SECONDS): - """ Convert duration between datetimes to a nice spoken timespan - - Accepts: - 2 x datetime.datetime - - Examples: - date1 = datetime(2019, 3, 12), - date2 = datetime(2019, 1, 1) -> "seventy days" - - date1 = datetime(2019, 12, 25, 20, 30), - date2 = datetime(2019, 10, 31, 8, 00), - speech = False -> "55d 12:30" - - Args: - date1, date2 (datetime.datetime) - lang (str, optional): a BCP-47 language code, None for default - speech (bool, opt): format output for speech (True) or display (False) - use_years (bool, opt): rtn years and days if True, total days if False - clock (bool, opt): always format output like digital clock (see below) - resolution (mycroft.util.format.TimeResolution, optional): lower bound - - mycroft.util.format.TimeResolution values: - TimeResolution.YEARS - TimeResolution.DAYS - TimeResolution.HOURS - TimeResolution.MINUTES - TimeResolution.SECONDS - - NOTE: nice_duration_dt() cannot do TimeResolution.MILLISECONDS - This will silently fall back on TimeResolution.SECONDS - - NOTE: clock will produce digital clock-like output appropriate to - resolution. Has no effect on resolutions DAYS or YEARS. Only - applies to displayed output. - - Returns: - str: timespan as a string - """ - try: - big = max(date1, date2) - small = min(date1, date2) - except(TypeError): - big = date1 - small = date2 - return _duration_handler(big, lang=lang, speech=speech, time2=small, - use_years=use_years, resolution=resolution, - clock=clock) diff --git a/mycroft/util/json_helper.py b/mycroft/util/json_helper.py deleted file mode 100644 index 521d9e5d9a03..000000000000 --- a/mycroft/util/json_helper.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat import for mycroft-core -# this code is maintained as part of ovos_utils -from ovos_utils.json_helper import merge_dict, load_commented_json, uncomment_json diff --git a/mycroft/util/log.py b/mycroft/util/log.py deleted file mode 100644 index 3d78bc347af1..000000000000 --- a/mycroft/util/log.py +++ /dev/null @@ -1,9 +0,0 @@ -# backwards compat import for mycroft-core -# this code is maintained as part of ovos_utils -from ovos_utils.log import LOG - - -def getLogger(name="MYCROFT"): - """Depreciated. Use LOG instead""" - return LOG - diff --git a/mycroft/util/monotonic_event.py b/mycroft/util/monotonic_event.py deleted file mode 100644 index 3434d54e2e5b..000000000000 --- a/mycroft/util/monotonic_event.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat import -from ovos_utils.process_utils import MonotonicEvent - diff --git a/mycroft/util/network_utils.py b/mycroft/util/network_utils.py deleted file mode 100644 index 23536a1156c3..000000000000 --- a/mycroft/util/network_utils.py +++ /dev/null @@ -1,102 +0,0 @@ -import socket -from urllib.error import URLError -from urllib.request import urlopen -import ovos_config.config -import requests -from ovos_utils.log import LOG - - -def _get_network_tests_config(): - """Get network_tests object from mycroft.configuration.""" - config = ovos_config.config.Configuration() - return config.get('network_tests', { - "dns_primary": "8.8.8.8", - "dns_secondary": "8.8.4.4", - "web_url": "https://www.google.com", - "ncsi_endpoint": "http://www.msftncsi.com/ncsi.txt", - "ncsi_expected_text": "Microsoft NCSI" - }) - - -def connected(): - """Check connection by connecting to 8.8.8.8 and if google.com is - reachable if this fails, Check Microsoft NCSI is used as a backup. - - Returns: - True if internet connection can be detected - """ - if _connected_dns(): - # Outside IP is reachable check if names are resolvable - return _connected_google() - else: - # DNS can't be reached, do a complete fetch in case it's blocked - return _connected_ncsi() - - -def _connected_ncsi(): - """Check internet connection by retrieving the Microsoft NCSI endpoint. - - Returns: - True if internet connection can be detected - """ - config = _get_network_tests_config() - ncsi_endpoint = config.get('ncsi_endpoint', - "http://www.msftncsi.com/ncsi.txt") - expected_text = config.get('ncsi_expected_text', "Microsoft NCSI") - try: - r = requests.get(ncsi_endpoint) - if r.text == expected_text: - return True - except Exception: - LOG.error("Unable to verify connection via NCSI endpoint.") - return False - - -def _connected_dns(host=None, port=53, timeout=3): - """Check internet connection by connecting to DNS servers - - Returns: - True if internet connection can be detected - """ - # Thanks to 7h3rAm on - # Host: 8.8.8.8 (google-public-dns-a.google.com) - # OpenPort: 53/tcp - # Service: domain (DNS/TCP) - config = _get_network_tests_config() - if host is None: - host = config.get('dns_primary', "8.8.8.8") - try: - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.settimeout(timeout) - s.connect((host, port)) - return True - except IOError: - LOG.error("Unable to connect to primary DNS server, " - "trying secondary...") - try: - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.settimeout(timeout) - dns_secondary = config.get('dns_secondary', "8.8.4.4") - s.connect((dns_secondary, port)) - return True - except IOError: - LOG.error("Unable to connect to secondary DNS server.") - return False - - -def _connected_google(): - """Check internet connection by connecting to www.google.com - Returns: - True if connection attempt succeeded - """ - connect_success = False - config = _get_network_tests_config() - url = config.get('web_url', "https://www.google.com") - try: - urlopen(url, timeout=3) - except URLError as ue: - LOG.error('Attempt to connect to internet failed: ' + str(ue.reason)) - else: - connect_success = True - - return connect_success diff --git a/mycroft/util/parse.py b/mycroft/util/parse.py deleted file mode 100644 index f271b0847020..000000000000 --- a/mycroft/util/parse.py +++ /dev/null @@ -1,129 +0,0 @@ -# -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -""" -The mycroft.util.parse module provides various parsing functions for things -like numbers, times, durations etc. It's intention is to convert naturally -expressed concepts into standard computer readable formats. Doing this also -enables localization. - -It also provides some useful associated functions like basic fuzzy matching. - -The module uses lingua-franca (https://github.com/mycroftai/lingua-franca) to -do most of the actual parsing. However methods may be wrapped specifically for -use in Mycroft Skills. -""" -from warnings import warn -from mycroft.util.time import now_local -from ovos_utils.log import LOG -from ovos_config.locale import get_default_lang - -# backwards compat import for mycroft-core -# this code is maintained as part of ovos_utils -from ovos_utils.parse import fuzzy_match, match_one - -try: - # lingua_franca is optional, individual skills may install it if they need - # to use it - from lingua_franca.parse import extract_number, extract_numbers, \ - extract_duration, get_gender, normalize - from lingua_franca.parse import extract_datetime as lf_extract_datetime - from lingua_franca.time import now_local -except ImportError: - def lingua_franca_error(*args, **kwargs): - raise ImportError("lingua_franca is not installed") - - - extract_number = extract_numbers = extract_duration = get_gender = \ - normalize = lf_extract_datetime = lingua_franca_error - - -def _log_unsupported_language(language, supported_languages): - """ - Log a warning when a language is unsupported - - Args: - language: str - The language that was supplied. - supported_languages: [str] - The list of supported languages. - """ - supported = ' '.join(supported_languages) - LOG.warning('Language "{language}" not recognized! Please make sure your ' - 'language is one of the following: {supported}.' - .format(language=language, supported=supported)) - - -def extract_datetime(text, anchorDate="DEFAULT", lang=None, - default_time=None): - """Extracts date and time information from a sentence. - - Parses many of the common ways that humans express dates and times, - including relative dates like "5 days from today", "tomorrow', and - "Tuesday". - - Vague terminology are given arbitrary values, like: - - * morning = 8 AM - * afternoon = 3 PM - * evening = 7 PM - - If a time isn't supplied or implied, the function defaults to 12 AM - - Args: - text (str): the text to be interpreted - anchorDate (:obj:`datetime`, optional): the date to be used for - relative dating (for example, what does "tomorrow" mean?). - Defaults to the current local date/time. - lang (str): the BCP-47 code for the language to use, None uses default - default_time (datetime.time): time to use if none was found in - the input string. - - Returns: - [:obj:`datetime`, :obj:`str`]: 'datetime' is the extracted date - as a datetime object in the user's local timezone. - 'leftover_string' is the original phrase with all date and time - related keywords stripped out. See examples for further - clarification - Returns 'None' if no date or time related text is found. - Examples: - >>> extract_datetime( - ... "What is the weather like the day after tomorrow?", - ... datetime(2017, 06, 30, 00, 00) - ... ) - [datetime.datetime(2017, 7, 2, 0, 0), 'what is weather like'] - >>> extract_datetime( - ... "Set up an appointment 2 weeks from Sunday at 5 pm", - ... datetime(2016, 02, 19, 00, 00) - ... ) - [datetime.datetime(2016, 3, 6, 17, 0), 'set up appointment'] - >>> extract_datetime( - ... "Set up an appointment", - ... datetime(2016, 02, 19, 00, 00) - ... ) - None - """ - if anchorDate is None: - warn(DeprecationWarning("extract_datetime(anchorDate=None) is " - "deprecated. This parameter can be omitted.")) - if anchorDate is None or anchorDate == "DEFAULT": - anchorDate = now_local() - if not lang: - lang = get_default_lang() - return lf_extract_datetime(text, - anchorDate, - lang, - default_time) diff --git a/mycroft/util/platform.py b/mycroft/util/platform.py deleted file mode 100644 index 0298ea9bc890..000000000000 --- a/mycroft/util/platform.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2020 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Utilities checking for platform features.""" -import os - - -def get_arch(): - """ Get architecture string of system. """ - return os.uname()[4] diff --git a/mycroft/util/plugins.py b/mycroft/util/plugins.py deleted file mode 100644 index f87b3ebfc075..000000000000 --- a/mycroft/util/plugins.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2020 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Common functions for loading plugins.""" - -import pkg_resources - -from .log import LOG - - -def find_plugins(plug_type): - """Finds all plugins matching specific entrypoint type. - - Args: - plug_type (str): plugin entrypoint string to retrieve - - Returns: - dict mapping plugin names to plugin entrypoints - """ - return { - entry_point.name: entry_point.load() - for entry_point - in pkg_resources.iter_entry_points(plug_type) - } - - -def load_plugin(plug_type, plug_name): - """Load a specific plugin from a specific plugin type. - - Args: - plug_type: (str) plugin type name. Ex. "mycroft.plugin.tts". - plug_name: (str) specific plugin name - - Returns: - Loaded plugin Object or None if no matching object was found. - """ - plugins = find_plugins(plug_type) - if plug_name in plugins: - ret = plugins[plug_name] - else: - LOG.warning('Could not find the plugin {}.{}'.format(plug_type, - plug_name)) - ret = None - - return ret diff --git a/mycroft/util/process_utils.py b/mycroft/util/process_utils.py deleted file mode 100644 index e9bd58c6ade9..000000000000 --- a/mycroft/util/process_utils.py +++ /dev/null @@ -1,136 +0,0 @@ -import json -import logging -import signal as sig -from threading import Event -from ovos_utils.log import LOG -from ovos_config.config import Configuration -from ovos_utils import create_daemon, wait_for_exit_signal -from ovos_bus_client import MessageBusClient - -from ovos_utils.process_utils import ProcessState, ProcessStatus, StatusCallbackMap - - -def reset_sigint_handler(): - """Reset the sigint handler to the default. - - This fixes KeyboardInterrupt not getting raised when started via - start-mycroft.sh - """ - sig.signal(sig.SIGINT, sig.default_int_handler) - - -_log_all_bus_messages = False - - -def bus_logging_status(): - global _log_all_bus_messages - return _log_all_bus_messages - - -def _update_log_level(msg, name): - """Update log level for process. - - Args: - msg (Message): Message sent to trigger the log level change - name (str): Name of the current process - """ - global _log_all_bus_messages - - # Respond to requests to adjust the logger settings - lvl = msg["data"].get("level", "").upper() - if lvl in ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG"]: - LOG.level = lvl - LOG(name).info("Changing log level to: {}".format(lvl)) - try: - logging.getLogger().setLevel(lvl) - logging.getLogger('urllib3').setLevel(lvl) - except Exception: - pass # We don't really care about if this fails... - else: - LOG(name).info("Invalid level provided: {}".format(lvl)) - - # Allow enable/disable of messagebus traffic - log_bus = msg["data"].get("bus", None) - if log_bus is not None: - LOG(name).info("Bus logging: {}".format(log_bus)) - _log_all_bus_messages = log_bus - - -def create_echo_function(name, whitelist=None): - """Standard logging mechanism for Mycroft processes. - - This handles the setup of the basic logging for all Mycroft - messagebus-based processes. - TODO 20.08: extract log level setting thing completely from this function - - Args: - name (str): Reference name of the process - whitelist (list, optional): List of "type" strings. If defined, only - messages in this list will be logged. - - Returns: - func: The echo function - """ - blacklist = Configuration().get("ignore_logs") - - # Make sure whitelisting doesn't remove the log level setting command - if whitelist: - whitelist.append('mycroft.debug.log') - - def echo(message): - global _log_all_bus_messages - try: - msg = json.loads(message) - msg_type = msg.get("type", "") - # Whitelist match beginning of message - # i.e 'mycroft.audio.service' will allow the message - # 'mycroft.audio.service.play' for example - if whitelist and not any([msg_type.startswith(e) - for e in whitelist]): - return - - if blacklist and msg_type in blacklist: - return - - if msg_type == "mycroft.debug.log": - _update_log_level(msg, name) - elif msg_type == "registration": - # do not log tokens from registration messages - msg["data"]["token"] = None - message = json.dumps(msg) - except Exception as e: - LOG.info("Error: {}".format(repr(e)), exc_info=True) - - if _log_all_bus_messages: - # Listen for messages and echo them for logging - LOG(name).info("BUS: {}".format(message)) - - return echo - - -def start_message_bus_client(service, bus=None, whitelist=None): - """Start the bus client daemon and wait for connection. - - Args: - service (str): name of the service starting the connection - bus (MessageBusClient): an instance of the Mycroft MessageBusClient - whitelist (list, optional): List of "type" strings. If defined, only - messages in this list will be logged. - Returns: - A connected instance of the MessageBusClient - """ - # Create a client if one was not provided - if bus is None: - bus = MessageBusClient() - Configuration.set_config_update_handlers(bus) - bus_connected = Event() - bus.on('message', create_echo_function(service, whitelist)) - # Set the bus connected event when connection is established - bus.once('open', bus_connected.set) - create_daemon(bus.run_forever) - - # Wait for connection - bus_connected.wait() - LOG.info('Connected to messagebus') - - return bus diff --git a/mycroft/util/signal.py b/mycroft/util/signal.py deleted file mode 100644 index 73373bab9bcb..000000000000 --- a/mycroft/util/signal.py +++ /dev/null @@ -1,4 +0,0 @@ -# backwards compat import for mycroft-core -# this code is maintained as part of ovos_utils -from ovos_utils.signal import get_ipc_directory, create_signal, \ - check_for_signal diff --git a/mycroft/util/string_utils.py b/mycroft/util/string_utils.py deleted file mode 100644 index ea335013e65f..000000000000 --- a/mycroft/util/string_utils.py +++ /dev/null @@ -1,3 +0,0 @@ -# backwards compat import for mycroft-core -# this code is maintained as part of ovos_utils -from ovos_utils import camel_case_split diff --git a/mycroft/util/time.py b/mycroft/util/time.py deleted file mode 100644 index 419c0ca80022..000000000000 --- a/mycroft/util/time.py +++ /dev/null @@ -1,109 +0,0 @@ -# -# Copyright 2018 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -"""Time utils for getting and converting datetime objects for the Mycroft -system. This time is based on the setting in the Mycroft config and may or -may not match the system locale. -""" -from datetime import datetime -from dateutil.tz import gettz, tzlocal -from ovos_config.locale import get_default_tz -# LF ais optional and should not be needed because of time utils -# only parse and format utils require LF - -# NOTE: lingua_franca has some bad UTC assumptions in date conversions, -# for that reason we do not import from there in this case - -try: - import lingua_franca as LF -except ImportError: - LF = None - - -# backwards compat import, recommend using get_default_tz instead -def default_timezone(): - """Get the default timezone - - Based on user location settings location.timezone.code or - the default system value if no setting exists. - - Returns: - (datetime.tzinfo): Definition of the default timezone - """ - return get_default_tz() - - -def now_utc(): - """Retrieve the current time in UTC - - Returns: - (datetime): The current time in Universal Time, aka GMT - """ - return datetime.utcnow().replace(tzinfo=gettz("UTC")) - - -def now_local(tz=None): - """Retrieve the current time - - Args: - tz (datetime.tzinfo, optional): Timezone, default to user's settings - - Returns: - (datetime): The current time - """ - tz = tz or default_timezone() - return datetime.now(tz) - - -def to_utc(dt): - """Convert a datetime with timezone info to a UTC datetime - - Args: - dt (datetime): A datetime (presumably in some local zone) - Returns: - (datetime): time converted to UTC - """ - tz = gettz("UTC") - if not dt.tzinfo: - dt = dt.replace(tzinfo=default_timezone()) - return dt.astimezone(tz) - - -def to_local(dt): - """Convert a datetime to the user's local timezone - - Args: - dt (datetime): A datetime (if no timezone, defaults to UTC) - Returns: - (datetime): time converted to the local timezone - """ - tz = default_timezone() - if not dt.tzinfo: - dt = dt.replace(tzinfo=default_timezone()) - return dt.astimezone(tz) - - -def to_system(dt): - """Convert a datetime to the system's local timezone - - Args: - dt (datetime): A datetime (if no timezone, assumed to be UTC) - Returns: - (datetime): time converted to the operation system's timezone - """ - tz = tzlocal() - if not dt.tzinfo: - dt = dt.replace(tzinfo=default_timezone()) - return dt.astimezone(tz) diff --git a/mycroft/version.py b/mycroft/version.py deleted file mode 100644 index 601d48bb387e..000000000000 --- a/mycroft/version.py +++ /dev/null @@ -1,14 +0,0 @@ -from ovos_core.version import OVOS_VERSION_STR, OVOS_VERSION_BUILD, OVOS_VERSION_TUPLE, \ - OVOS_VERSION_ALPHA, VersionManager, check_version - -# The following lines are replaced during the release process. -# START_VERSION_BLOCK -CORE_VERSION_MAJOR = 21 -CORE_VERSION_MINOR = 2 -CORE_VERSION_BUILD = 1 - -# END_VERSION_BLOCK -CORE_VERSION_TUPLE = (CORE_VERSION_MAJOR, - CORE_VERSION_MINOR, - CORE_VERSION_BUILD) -CORE_VERSION_STR = '.'.join(map(str, CORE_VERSION_TUPLE)) diff --git a/requirements/extra-deprecated.txt b/requirements/extra-deprecated.txt deleted file mode 100644 index bfcea171d34d..000000000000 --- a/requirements/extra-deprecated.txt +++ /dev/null @@ -1,16 +0,0 @@ -msm -mycroft-messagebus-client -mock_msm>=0.9 -ovos_cli_client -python-vlc>=1.1.2 -pyalsaaudio>=0.8 -pyserial>=3.0 -pillow>=8.3 -pyaudio - -# mycroft-core imports / default plugins -# for compat with mycroft namespace -ovos-listener>=0.0.3,<1.0.0 -ovos-tts-plugin-mimic>=0.2.8, <1.0.0 -ovos-ww-plugin-precise>=0.1, <1.0.0 -ovos-ww-plugin-pocketsphinx>=0.1, <1.0.0 \ No newline at end of file diff --git a/requirements/requirements.txt b/requirements/requirements.txt index cc8bf73a38ed..a44779d057f6 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -14,4 +14,6 @@ ovos-plugin-manager>=0.0.26,<1.0.0 ovos-config>=0.0.13,<1.0.0 ovos-lingua-franca>=0.4.7,<1.0.0 ovos-backend-client>=0.1.0,<2.0.0 -ovos-workshop>=0.0.16,<2.0.0 \ No newline at end of file +ovos-workshop>=1.0.0,<2.0.0 + +mycroft-legacy>=0.1.1, <1.0.0 diff --git a/setup.py b/setup.py index 7d5d0ae0b896..4962d96cc3b2 100644 --- a/setup.py +++ b/setup.py @@ -76,7 +76,6 @@ def required(requirements_file): extras_require={ 'mycroft': required('requirements/mycroft.txt'), 'lgpl': required('requirements/lgpl.txt'), - 'deprecated': required('requirements/extra-deprecated.txt'), 'plugins': required('requirements/plugins.txt'), 'skills-essential': required('requirements/skills-essential.txt'), 'skills-audio': required('requirements/skills-audio.txt'), @@ -85,7 +84,7 @@ def required(requirements_file): 'skills-gui': required('requirements/skills-gui.txt'), 'skills-media': required('requirements/skills-media.txt') }, - packages=find_packages(include=['mycroft*']) + find_packages(include=['ovos_core*']), + packages=find_packages(include=['ovos_core*']), include_package_data=True, classifiers=[ "Development Status :: 4 - Beta", @@ -95,17 +94,7 @@ def required(requirements_file): entry_points={ 'opm.pipeline': PLUGIN_ENTRY_POINT, 'console_scripts': [ - 'ovos-core=ovos_core.__main__:main', - # TODO - remove below console_scripts in 1.0.0 (backwards compat) - 'mycroft-speech-client=mycroft.listener.__main__:main', - 'mycroft-messagebus=mycroft.messagebus.service.__main__:main', - 'mycroft-skills=mycroft.skills.__main__:main', - 'mycroft-audio=mycroft.audio.__main__:main', - 'mycroft-echo-observer=mycroft.messagebus.client.ws:echo', - 'mycroft-audio-test=mycroft.util.audio_test:main', - 'mycroft-enclosure-client=ovos_PHAL.__main__:main', - 'mycroft-cli-client=mycroft.client.text.__main__:main', - 'mycroft-gui-service=mycroft.gui.__main__:main' + 'ovos-core=ovos_core.__main__:main' ] } ) diff --git a/test/backwards_compat/__init__.py b/test/backwards_compat/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/test/backwards_compat/test_configuration.py b/test/backwards_compat/test_configuration.py deleted file mode 100644 index 19eee8c84c07..000000000000 --- a/test/backwards_compat/test_configuration.py +++ /dev/null @@ -1,17 +0,0 @@ -from unittest import TestCase - -import mycroft.configuration - - -class TestConfiguration(TestCase): - - def test_get(self): - d1 = {'a': 1, 'b': {'c': 1, 'd': 2}} - d2 = {'b': {'d': 'changed'}} - d = mycroft.configuration.Configuration.get([d1, d2]) - self.assertEqual(d['a'], d1['a']) - self.assertEqual(d['b']['d'], d2['b']['d']) - self.assertEqual(d['b']['c'], d1['b']['c']) - - def tearDown(self): - mycroft.configuration.Configuration.load_config_stack([{}], True) diff --git a/test/backwards_compat/test_imports.py b/test/backwards_compat/test_imports.py deleted file mode 100644 index f55e7daaadd1..000000000000 --- a/test/backwards_compat/test_imports.py +++ /dev/null @@ -1,42 +0,0 @@ -import unittest - - -class TestDeprecatedImports(unittest.TestCase): - @unittest.skip("TODO - mock msm is deprecated ImportError: cannot import name 'get_skills_folder' from 'ovos_utils.skills' ") - def test_msm(self): - from mycroft.skills.msm_wrapper import create_msm, build_msm_config - - def test_tts(self): - from mycroft.tts import TTS, TTSValidator, TTSFactory, PlaybackThread, EMPTY_PLAYBACK_QUEUE_TUPLE - from mycroft.tts.tts import TTS, TTSValidator, TTSFactory, PlaybackThread, EMPTY_PLAYBACK_QUEUE_TUPLE - from mycroft.tts.cache import TextToSpeechCache, hash_from_path, hash_sentence - from mycroft.tts.remote_tts import RemoteTTS, RemoteTTSException, RemoteTTSTimeoutException - - @unittest.skip("TODO - fix missing imports") - def test_stt(self): - from mycroft.stt import STT, STTFactory, StreamingSTT, StreamThread, \ - KeySTT, TokenSTT, MycroftSTT, BasicSTT, GoogleJsonSTT - - def test_audio(self): - from mycroft.audio.services import AudioBackend, RemoteAudioBackend - from mycroft.audio.services.simple import SimpleAudioService - from mycroft.audio.services.vlc import VlcService - from mycroft.audio.speech import bus, config, tts, tts_hash, lock, \ - mimic_fallback_obj, handle_speak, mute_and_speak, \ - mimic_fallback_tts, handle_stop, init, shutdown - - @unittest.skip("TODO - requires ovos-listener") - def test_enclosure(self): - from mycroft.client.enclosure.mark1 import EnclosureMark1, EnclosureMouth, EnclosureEyes, \ - EnclosureArduino, EnclosureReader, EnclosureWriter - from mycroft.client.enclosure.mark2 import EnclosureMark2 - from mycroft.client.enclosure.generic import EnclosureGeneric - from mycroft.client.enclosure.base import Enclosure - - @unittest.skip("TODO - requires ovos-listener") - def test_speech(self): - from mycroft.client.speech.data_structures import RollingMean, CyclicAudioBuffer - from mycroft.client.speech.word_extractor import WordExtractor - from mycroft.client.speech.mic import MutableMicrophone, MutableStream, ResponsiveRecognizer, get_silence - from mycroft.client.speech.listener import AudioConsumer, AudioProducer, AudioStreamHandler, \ - RecognizerLoop, RecognizerLoopState, recognizer_conf_hash diff --git a/test/backwards_compat/test_ocp.py b/test/backwards_compat/test_ocp.py deleted file mode 100644 index 0a3f704ccf75..000000000000 --- a/test/backwards_compat/test_ocp.py +++ /dev/null @@ -1,484 +0,0 @@ -import json -import unittest - -import pytest - -import ovos_config.config -import mycroft.audio.audioservice -from os.path import dirname, join -from unittest.mock import patch - -import ovos_plugin_common_play -from ovos_plugin_common_play import OCPAudioBackend, OCP, PlayerState, MediaState, TrackState, PlaybackType -from mycroft.audio.interface import AudioService as MycroftAudioService -# from ovos_plugin_common_play.ocp.mycroft_cps import MycroftAudioService - -from mycroft.audio.audioservice import AudioService -# from mycroft.configuration import Configuration -from mycroft.skills.intent_service import IntentService -from mycroft.skills.skill_loader import SkillLoader -from ovos_utils.messagebus import FakeBus - -# Patch Configuration in the audioservice module to ensure its patched -from ovos_config.config import Configuration -mycroft.audio.audioservice.Configuration = Configuration - -BASE_CONF = {"Audio": - { - "native_sources": ["debug_cli", "audio"], - "default-backend": "OCP", # only used by mycroft-core - "preferred_audio_services": ["ovos_test", "mycroft_test"], - "backends": { - "OCP": { - "type": "ovos_common_play", - "active": True, - "mode": "local", - "disable_mpris": True - }, - "mycroft_test": { - "type": "mycroft_test", - "active": True - }, - "ovos_test": { - "type": "ovos_test", - "active": True - } - } - } -} - - -class TestOCPLoad(unittest.TestCase): - - @classmethod - @patch.object(ovos_config.config.Configuration, 'load_all_configs') - def setUpClass(self, mock) -> None: - mock.return_value = BASE_CONF - self.bus = FakeBus() - self.bus.emitted_msgs = [] - - def get_msg(msg): - msg = json.loads(msg) - msg.pop("context") - self.bus.emitted_msgs.append(msg) - - self.bus.on("message", get_msg) - - self.audio = AudioService(self.bus) - - @pytest.mark.skip - def test_native_ocp(self): - # assert that OCP is the selected default backend - self.assertTrue(isinstance(self.audio.default, OCPAudioBackend)) - - # assert that OCP is in "local" mode - self.assertEqual(self.audio.default.config["mode"], "local") - - # assert that OCP is loaded - self.assertTrue(self.audio.default.ocp is not None) - self.assertTrue(isinstance(self.audio.default.ocp, OCP)) - - # assert that test backends also loaded - # NOTE: "service" is a list, should be named "services" - # not renamed for backwards compat but its a typo! - loaded_services = [s.name for s in self.audio.service] - self.assertIn("mycroft_test", loaded_services) - self.assertIn("ovos_test", loaded_services) - - def tearDown(self) -> None: - self.audio.shutdown() - - -class TestCPS(unittest.TestCase): - bus = FakeBus() - - @classmethod - @patch.object(Configuration, 'load_all_configs') - def setUpClass(cls, mock) -> None: - mock.return_value = BASE_CONF - cls.bus.emitted_msgs = [] - - def get_msg(msg): - msg = json.loads(msg) - msg.pop("context") - cls.bus.emitted_msgs.append(msg) - - cls.bus.on("message", get_msg) - - @pytest.mark.skip # TODO? - def test_auto_unload(self): - intents = IntentService(self.bus) - skill = SkillLoader(self.bus, f"{dirname(__file__)}/ovos_tskill_mycroft_cps") - skill.skill_id = "skill-playback-control.mycroftai" - skill.load() - - # assert that mycroft common play intents registered - cps_msgs = [ - {'type': 'register_intent', - 'data': {'name': 'skill-playback-control.mycroftai:play', - 'requires': [['skill_playback_control_mycroftaiPlay', - 'skill_playback_control_mycroftaiPlay'], - ['skill_playback_control_mycroftaiPhrase', - 'skill_playback_control_mycroftaiPhrase']], - 'at_least_one': [], 'optional': []}}, - {'type': 'register_intent', - 'data': {'name': 'skill-playback-control.mycroftai:handle_prev', - 'requires': [['skill_playback_control_mycroftaiPrev', - 'skill_playback_control_mycroftaiPrev'], - ['skill_playback_control_mycroftaiTrack', - 'skill_playback_control_mycroftaiTrack']], - 'at_least_one': [], 'optional': []}}, - {'type': 'register_intent', - 'data': {'name': 'skill-playback-control.mycroftai:handle_pause', - 'requires': [['skill_playback_control_mycroftaiPause', - 'skill_playback_control_mycroftaiPause']], - 'at_least_one': [], 'optional': []}}, - {'type': 'register_intent', - 'data': {'name': 'skill-playback-control.mycroftai:handle_next', - 'requires': [['skill_playback_control_mycroftaiNext', - 'skill_playback_control_mycroftaiNext'], - ['skill_playback_control_mycroftaiTrack', - 'skill_playback_control_mycroftaiTrack']], - 'at_least_one': [], 'optional': []}}, - {'type': 'register_intent', - 'data': {'name': 'skill-playback-control.mycroftai:handle_play', 'requires': [], - 'at_least_one': [['skill_playback_control_mycroftaiPlayResume', - 'skill_playback_control_mycroftaiResume']], 'optional': []}} - ] - for intent in cps_msgs: - self.assertIn(intent, self.bus.emitted_msgs) - - # assert that mycroft common play intents loaded - cps_intents = [ - {'name': 'skill-playback-control.mycroftai:handle_prev', - 'requires': [('skill_playback_control_mycroftaiPrev', 'skill_playback_control_mycroftaiPrev'), - ('skill_playback_control_mycroftaiTrack', 'skill_playback_control_mycroftaiTrack')], - 'at_least_one': [], 'optional': []}, - {'name': 'skill-playback-control.mycroftai:handle_play', 'requires': [], - 'at_least_one': [('skill_playback_control_mycroftaiPlayResume', 'skill_playback_control_mycroftaiResume')], - 'optional': []}, - {'name': 'skill-playback-control.mycroftai:handle_pause', - 'requires': [('skill_playback_control_mycroftaiPause', 'skill_playback_control_mycroftaiPause')], - 'at_least_one': [], 'optional': []}, - {'name': 'skill-playback-control.mycroftai:play', - 'requires': [('skill_playback_control_mycroftaiPlay', 'skill_playback_control_mycroftaiPlay'), - ('skill_playback_control_mycroftaiPhrase', 'skill_playback_control_mycroftaiPhrase')], - 'at_least_one': [], 'optional': []}, - {'name': 'skill-playback-control.mycroftai:handle_next', - 'requires': [('skill_playback_control_mycroftaiNext', 'skill_playback_control_mycroftaiNext'), - ('skill_playback_control_mycroftaiTrack', 'skill_playback_control_mycroftaiTrack')], - 'at_least_one': [], 'optional': []} - ] - for intent in cps_intents: - self.assertIn(intent, intents.registered_intents) - - # load ocp - self.bus.emitted_msgs = [] - cfg = {} - ocp = OCPAudioBackend(cfg, self.bus) - - # assert that mycroft common play was deregistered - disable_msgs = [ - {'type': 'skillmanager.deactivate', - 'data': {'skill': 'skill-playback-control.mycroftai'}}, - {'type': 'skillmanager.deactivate', - 'data': {'skill': 'mycroft-playback-control.mycroftai'}}, - {'type': 'skillmanager.deactivate', - 'data': {'skill': 'mycroft-playback-control'}}, - {'type': 'skillmanager.deactivate', - 'data': {'skill': 'skill-playback-control'}} - ] # possible skill-ids for mycroft skill - for msg in disable_msgs: - self.assertIn(msg, self.bus.emitted_msgs) - # skill manager would call this if connected to bus - if msg["data"]["skill"] == skill.skill_id: - skill.deactivate() - - # assert that OCP intents registered - locale_folder = join(dirname(ovos_plugin_common_play.__file__), - "ocp", "res", "locale", "en-us") - ocp_msgs = [ - {'type': 'padatious:register_intent', - 'data': { - 'file_name': f'{locale_folder}/play.intent', - 'name': 'ovos.common_play:play.intent', 'lang': 'en-us'}}, - {'type': 'padatious:register_intent', - 'data': { - 'file_name': f'{locale_folder}/read.intent', - 'name': 'ovos.common_play:read.intent', 'lang': 'en-us'}}, - {'type': 'padatious:register_intent', - 'data': { - 'file_name': f'{locale_folder}/open.intent', - 'name': 'ovos.common_play:open.intent', 'lang': 'en-us'}}, - {'type': 'padatious:register_intent', - 'data': { - 'file_name': f'{locale_folder}/next.intent', - 'name': 'ovos.common_play:next.intent', 'lang': 'en-us'}}, - {'type': 'padatious:register_intent', - 'data': { - 'file_name': f'{locale_folder}/prev.intent', - 'name': 'ovos.common_play:prev.intent', 'lang': 'en-us'}}, - {'type': 'padatious:register_intent', - 'data': { - 'file_name': f'{locale_folder}/pause.intent', - 'name': 'ovos.common_play:pause.intent', 'lang': 'en-us'}}, - {'type': 'padatious:register_intent', - 'data': { - 'file_name': f'{locale_folder}/resume.intent', - 'name': 'ovos.common_play:resume.intent', 'lang': 'en-us'}}, - {'type': 'ovos.common_play.skills.get', - 'data': {}} - ] - for intent in ocp_msgs: - self.assertIn(intent, self.bus.emitted_msgs) - - # assert that mycroft common play intents unloaded - detach_msg = {'type': 'detach_skill', - 'data': {'skill_id': 'skill-playback-control.mycroftai:'}} - self.assertIn(detach_msg, self.bus.emitted_msgs) - for intent in cps_intents: - self.assertNotIn(intent, intents.registered_intents) - - ocp.shutdown() - - -class TestAudioServiceApi(unittest.TestCase): - bus = FakeBus() - - @classmethod - @patch.object(Configuration, 'load_all_configs') - def setUpClass(cls, mock) -> None: - mock.return_value = BASE_CONF - cls.bus.emitted_msgs = [] - - def get_msg(msg): - msg = json.loads(msg) - msg.pop("context") - cls.bus.emitted_msgs.append(msg) - - cls.bus.on("message", get_msg) - - cls.api = MycroftAudioService(cls.bus) - cls.audio = AudioService(cls.bus) - - @pytest.mark.skip # Also skipped in OCP Plugin tests - def test_ocp_plugin_compat_layer(self): - self.bus.emitted_msgs = [] - - # test play track from single uri - test_uri = "file://path/to/music.mp3" - self.api.play([test_uri]) - expected = [ - {'type': 'mycroft.audio.service.play', - 'data': {'tracks': [test_uri], - 'utterance': '', 'repeat': False}}, - {'type': 'ovos.common_play.playlist.clear', 'data': {}}, - {'type': 'ovos.common_play.media.state', 'data': {'state': 3}}, - {'type': 'ovos.common_play.track.state', 'data': {'state': 31}}, - {'type': 'ovos.common_play.playlist.queue', - 'data': { - 'tracks': [{'uri': test_uri, - 'title': 'music.mp3', 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface'}]}}, - {'type': 'ovos.common_play.play', - 'data': { - 'repeat': False, - 'media': { - 'uri': test_uri, - 'title': 'music.mp3', 'playback': 2, 'status': 1, 'skill_id': 'mycroft.audio_interface', - 'skill': 'mycroft.audio_interface', 'position': 0, 'length': None, 'skill_icon': None, - 'artist': None, 'is_cps': False, 'cps_data': {}}, - 'playlist': [ - {'uri': test_uri, - 'title': 'music.mp3', 'playback': 2, 'status': 1, 'skill_id': 'mycroft.audio_interface', - 'skill': 'mycroft.audio_interface', 'position': 0, 'length': None, 'skill_icon': None, - 'artist': None, 'is_cps': False, 'cps_data': {}}]}} - ] - for m in expected: - self.assertIn(m, self.bus.emitted_msgs) - - # test pause - self.bus.emitted_msgs = [] - self.api.pause() - expected = [ - {'type': 'mycroft.audio.service.pause', 'data': {}}, - {'type': 'ovos.common_play.pause', 'data': {}} - ] - for m in expected: - self.assertIn(m, self.bus.emitted_msgs) - - # test resume - self.bus.emitted_msgs = [] - self.api.resume() - expected = [ - {'type': 'mycroft.audio.service.resume', 'data': {}}, - {'type': 'ovos.common_play.resume', 'data': {}} - ] - for m in expected: - self.assertIn(m, self.bus.emitted_msgs) - - # test next - self.bus.emitted_msgs = [] - self.api.next() - expected = [ - {'type': 'mycroft.audio.service.next', 'data': {}}, - {'type': 'ovos.common_play.next', 'data': {}} - ] - for m in expected: - self.assertIn(m, self.bus.emitted_msgs) - - # test prev - self.bus.emitted_msgs = [] - self.api.prev() - expected = [ - {'type': 'mycroft.audio.service.prev', 'data': {}}, - {'type': 'ovos.common_play.previous', 'data': {}} - ] - for m in expected: - self.assertIn(m, self.bus.emitted_msgs) - - # test queue - self.bus.emitted_msgs = [] - playlist = ["file://path/to/music2.mp3", "file://path/to/music3.mp3"] - self.api.queue(playlist) - expected = [ - {'type': 'mycroft.audio.service.queue', - 'data': {'tracks': ['file://path/to/music2.mp3', 'file://path/to/music3.mp3']}}, - {'type': 'ovos.common_play.playlist.queue', - 'data': {'tracks': [ - {'uri': 'file://path/to/music2.mp3', 'title': 'music2.mp3', 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface'}, - {'uri': 'file://path/to/music3.mp3', 'title': 'music3.mp3', 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface'}] - }} - ] - for m in expected: - self.assertIn(m, self.bus.emitted_msgs) - - # test play playlist - self.bus.emitted_msgs = [] - self.api.play([test_uri] + playlist) - expected = [ - {'type': 'mycroft.audio.service.play', - 'data': {'tracks': ['file://path/to/music.mp3', 'file://path/to/music2.mp3', 'file://path/to/music3.mp3'], - 'utterance': '', - 'repeat': False}}, - {'type': 'ovos.common_play.playlist.queue', - 'data': {'tracks': [ - {'uri': 'file://path/to/music.mp3', 'title': 'music.mp3', 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface'}, - {'uri': 'file://path/to/music2.mp3', 'title': 'music2.mp3', 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface'}, - {'uri': 'file://path/to/music3.mp3', 'title': 'music3.mp3', 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface'}]}}, - {'type': 'ovos.common_play.play', - 'data': {'repeat': False, - 'media': {'uri': 'file://path/to/music.mp3', - 'title': 'music.mp3', 'playback': 2, - 'status': 1, - 'skill_id': 'mycroft.audio_interface', - 'skill': 'mycroft.audio_interface', - 'position': 0, 'length': None, - 'skill_icon': None, 'artist': None, - 'is_cps': False, 'cps_data': {}}, - 'playlist': [ - {'uri': 'file://path/to/music.mp3', 'title': 'music.mp3', - 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface', - 'skill': 'mycroft.audio_interface', 'position': 0, - 'length': None, 'skill_icon': None, 'artist': None, - 'is_cps': False, 'cps_data': {}}, - {'uri': 'file://path/to/music2.mp3', 'title': 'music2.mp3', - 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface', - 'skill': 'mycroft.audio_interface', 'position': 0, - 'length': None, 'skill_icon': None, 'artist': None, - 'is_cps': False, 'cps_data': {}}, - {'uri': 'file://path/to/music3.mp3', 'title': 'music3.mp3', - 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface', - 'skill': 'mycroft.audio_interface', 'position': 0, - 'length': None, 'skill_icon': None, 'artist': None, - 'is_cps': False, 'cps_data': {}}]}} - ] - for m in expected: - self.assertIn(m, self.bus.emitted_msgs) - - @pytest.mark.skip # Also skipped in OCP Plugin tests - def test_play_mycroft_backend(self): - self.bus.emitted_msgs = [] - selected = "mycroft_test" - tracks = ["file://path/to/music.mp3", "file://path/to/music2.mp3"] - - # assert OCP not in use - self.assertNotEqual(self.audio.default.ocp.player.state, PlayerState.PLAYING) - - self.api.play(tracks, repeat=True, utterance=selected) - - # correct service selected - self.assertEqual(self.audio.current.name, selected) - self.assertTrue(self.audio.current.playing) - - # OCP is not aware of internal player state - state events not emitted by mycroft plugins - self.assertNotEqual(self.audio.default.ocp.player.state, PlayerState.PLAYING) - - # but track state is partially accounted for - self.assertEqual(self.audio.default.ocp.player.now_playing.uri, tracks[0]) - self.assertEqual(self.audio.default.ocp.player.now_playing.playback, PlaybackType.AUDIO_SERVICE) - self.assertEqual(self.audio.default.ocp.player.now_playing.status, TrackState.QUEUED_AUDIOSERVICE) - self.assertEqual(self.audio.default.ocp.player.now_playing.skill_id, "mycroft.audio_interface") - - self.audio.current._track_start_callback("track_name") - self.assertEqual(self.audio.default.ocp.player.now_playing.status, TrackState.PLAYING_AUDIOSERVICE) - - @pytest.mark.skip # Also skipped in OCP Plugin tests - def test_play_ocp_backend(self): - self.bus.emitted_msgs = [] - - selected = "ovos_test" - tracks = ["file://path/to/music.mp3", "file://path/to/music2.mp3"] - - # assert OCP not in use - self.assertNotEqual(self.audio.default.ocp.player.state, PlayerState.PLAYING) - - # NOTE: this usage is equivalent to what OCP itself - # does internally to select audio_service, where "utterance" is also used - self.api.play(tracks, repeat=True, utterance=selected) - - # correct service selected - self.assertEqual(self.audio.current.name, selected) - - # ocp state events emitted - exptected = [ - {'type': 'mycroft.audio.service.play', - 'data': {'tracks': ['file://path/to/music.mp3', 'file://path/to/music2.mp3'], 'utterance': 'ovos_test', - 'repeat': True}}, - {'type': 'ovos.common_play.playlist.clear', 'data': {}}, # TODO - maybe this is unwanted (?) - {'type': 'ovos.common_play.media.state', 'data': {'state': 3}}, - {'type': 'ovos.common_play.track.state', 'data': {'state': 31}}, - {'type': 'ovos.common_play.playlist.queue', 'data': {'tracks': [ - {'uri': 'file://path/to/music.mp3', 'title': 'music.mp3', 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface'}, - {'uri': 'file://path/to/music2.mp3', 'title': 'music2.mp3', 'playback': 2, 'status': 1, - 'skill_id': 'mycroft.audio_interface'}]}}, - {'type': 'ovos.common_play.repeat.set', 'data': {}}, - {'type': 'ovos.common_play.player.state', 'data': {'state': 1}}, - {'type': 'ovos.common_play.media.state', 'data': {'state': 3}}, - {'type': 'ovos.common_play.track.state', 'data': {'state': 21}} - ] - for m in exptected: - self.assertIn(m, self.bus.emitted_msgs) - - # assert OCP is tracking state - self.assertEqual(self.audio.default.ocp.player.state, PlayerState.PLAYING) - self.assertEqual(self.audio.default.ocp.player.media_state, MediaState.LOADED_MEDIA) - self.assertEqual(self.audio.default.ocp.player.now_playing.uri, tracks[0]) - self.assertEqual(self.audio.default.ocp.player.now_playing.playback, PlaybackType.AUDIO_SERVICE) - self.assertEqual(self.audio.default.ocp.player.now_playing.status, TrackState.PLAYING_AUDIOSERVICE) - - def tearDown(self) -> None: - self.audio.shutdown() - - -if __name__ == '__main__': - unittest.main() diff --git a/test/backwards_compat/test_simple_audio_backend.py b/test/backwards_compat/test_simple_audio_backend.py deleted file mode 100644 index 3540644479b4..000000000000 --- a/test/backwards_compat/test_simple_audio_backend.py +++ /dev/null @@ -1,155 +0,0 @@ -import signal -from threading import Thread -import time -import unittest -import unittest.mock as mock - -import mycroft.deprecated.audio.services.simple as simple -from ovos_bus_client.message import Message - -"""Tests for the simple audio service backend.""" - -config = { - 'backends': { - 'test_simple': { - 'type': 'simple', - 'active': True - } - } -} - - -class CallWaiter: - """Wrapper for logic waiting for play status to be called.""" - def __init__(self): - self.called = False - - def set(self): - """Call has been received.""" - self.called = True - - def wait(self): - """Wait for call.""" - while not self.called: - time.sleep(0.1) - time.sleep(0.1) - self.called = False - - -class TestSimpleBackend(unittest.TestCase): - @mock.patch('mycroft.deprecated.audio.services.simple.Session') - def test_find_mime(self, mock_session): - mock_response = mock.MagicMock() - mock_session_instance = mock.Mock() - mock_session_instance.head.return_value = mock_response - mock_session.return_value = mock_session_instance - - # Check local file - self.assertEqual(simple.find_mime('file:///hello.mp3'), - ['audio', 'mpeg']) - - # Check HTTP - mock_response.status_code = 200 - mock_response.headers.__getitem__.return_value = 'audio/mpeg' - self.assertEqual(simple.find_mime('http://mysite.se/hello.mp3'), - ['audio', 'mpeg']) - - status_code = 300 - mock_response.headers.__getitem__.return_value = '' - self.assertEqual(simple.find_mime('http://mysite.se/hello.mp3'), - ['audio', 'mpeg']) - self.assertEqual( - simple.find_mime('http://mysite.se/hello.mp3?world=True'), - ['audio', 'mpeg']) - - # Check no info found - self.assertEqual(simple.find_mime('file:///no_extension'), - (None, None)) - - def test_load_service(self): - bus = mock.Mock() - self.assertEqual(len(simple.load_service(config, bus)), 1) - - def test_playlist_methods(self): - bus = mock.Mock() - service = simple.SimpleAudioService(config, bus) - self.assertEqual(service.tracks, []) - self.assertTrue(isinstance(service.supported_uris(), list)) - - service.add_list(['a', 'b', 'c']) - self.assertEqual(service.tracks, ['a', 'b', 'c']) - - service.clear_list() - self.assertEqual(service.tracks, []) - - def test_play(self): - bus = mock.Mock() - service = simple.SimpleAudioService(config, bus) - service.play() - self.assertTrue(bus.emit.called) - - @unittest.skip("TODO - fix me - does not have the attribute 'play_wav'") - #@mock.patch('mycroft.deprecated.audio.services.simple.play_mp3') - #@mock.patch('mycroft.deprecated.audio.services.simple.play_ogg') - #@mock.patch('mycroft.deprecated.audio.services.simple.play_wav') - def test_play_internals(self, play_wav_mock, play_ogg_mock, play_mp3_mock): - bus = mock.Mock() - process_mock = mock.Mock(name='process') - - completed = False - called = CallWaiter() - - def wait_for_completion(): - nonlocal completed - nonlocal called - called.set() - if not completed: - return None - else: - completed = False - return True - - process_mock.poll.side_effect = wait_for_completion - play_wav_mock.return_value = process_mock - play_ogg_mock.return_value = process_mock - play_mp3_mock.return_value = process_mock - - service = simple.SimpleAudioService(config, bus) - tracks = ['a.mp3', ['b.ogg', 'audio/ogg'], ['c.wav', 'audio/wav']] - service.add_list(tracks) - service.play() - - thread = Thread(target=service._play, args=[Message('plaything')]) - thread.daemon = True - thread.start() - called.wait() - - play_mp3_mock.assert_called_with('a.mp3') - completed = True - time.sleep(1) - self.assertEqual(service.index, 1) - thread.join() - - thread = Thread(target=service._play, args=[Message('plaything')]) - thread.daemon = True - thread.start() - called.wait() - - play_ogg_mock.assert_called_with('b.ogg') - - service.pause() - process_mock.send_signal.assert_called_with(signal.SIGSTOP) - self.assertEqual(service._paused, True) - service.resume() - self.assertEqual(service._paused, False) - completed = True - thread.join() - - thread = Thread(target=service._play, args=[Message('plaything')]) - thread.daemon = True - thread.start() - called.wait() - play_wav_mock.assert_called_with('c.wav') - - service.stop() - thread.join() diff --git a/test/end2end/skill-fake-fm-legacy/__init__.py b/test/end2end/skill-fake-fm-legacy/__init__.py deleted file mode 100644 index f5bdbad46c7c..000000000000 --- a/test/end2end/skill-fake-fm-legacy/__init__.py +++ /dev/null @@ -1,36 +0,0 @@ -from typing import Tuple - -from mycroft.skills.common_play_skill import CommonPlaySkill, CPSMatchLevel - - -class FakeFMLegacySkill(CommonPlaySkill): - - def CPS_match_query_phrase(self, phrase: str) -> Tuple[str, float, dict]: - """Respond to Common Play Service query requests. - - Args: - phrase: utterance request to parse - - Returns: - Tuple(Name of station, confidence, Station information) - """ - score = 50 - if "fake" in phrase: - score += 35 - - # Translate match confidence levels to CPSMatchLevels - if score >= 90: - match_level = CPSMatchLevel.EXACT - elif score >= 70: - match_level = CPSMatchLevel.ARTIST - elif score >= 50: - match_level = CPSMatchLevel.CATEGORY - else: - return None - - cb = {"uri": f"https://fake.mp3", "foo": "bar"} - return phrase, match_level, cb - - def CPS_start(self, phrase, data): - """Handle request from Common Play System to start playback.""" - self.audioservice.play(data["uri"]) diff --git a/test/end2end/skill-fake-fm-legacy/setup.py b/test/end2end/skill-fake-fm-legacy/setup.py deleted file mode 100755 index c20d9dfce5c7..000000000000 --- a/test/end2end/skill-fake-fm-legacy/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python3 -from os import walk, path - -from setuptools import setup - -URL = "https://github.com/OpenVoiceOS/skill-fake-fm-legacy" -SKILL_CLAZZ = "FakeFMLegacySkill" # needs to match __init__.py class name - -# below derived from github url to ensure standard skill_id -SKILL_AUTHOR, SKILL_NAME = URL.split(".com/")[-1].split("/") -SKILL_PKG = SKILL_NAME.lower().replace('-', '_') -PLUGIN_ENTRY_POINT = f'{SKILL_NAME.lower()}.{SKILL_AUTHOR.lower()}={SKILL_PKG}:{SKILL_CLAZZ}' - - -# skill_id=package_name:SkillClass - - -def find_resource_files(): - resource_base_dirs = ("locale", "ui", "vocab", "dialog", "regex", "skill") - base_dir = path.dirname(__file__) - package_data = ["*.json"] - for res in resource_base_dirs: - if path.isdir(path.join(base_dir, res)): - for (directory, _, files) in walk(path.join(base_dir, res)): - if files: - package_data.append( - path.join(directory.replace(base_dir, "").lstrip('/'), - '*')) - return package_data - - -setup( - name="skill-fake-fm-legacy", - version="0.0.0", - long_description="test", - description='OVOS test plugin', - author_email='jarbasai@mailfence.com', - license='Apache-2.0', - package_dir={SKILL_PKG: ""}, - package_data={SKILL_PKG: find_resource_files()}, - packages=[SKILL_PKG], - include_package_data=True, - install_requires=["ovos-workshop>=0.0.16a8"], - keywords='ovos skill plugin', - entry_points={'ovos.plugin.skill': PLUGIN_ENTRY_POINT} -) diff --git a/test/integrationtests/common_query/ovos_tskill_fakewiki/__init__.py b/test/integrationtests/common_query/ovos_tskill_fakewiki/__init__.py index 48c0212e50f2..f2d4494e25e8 100644 --- a/test/integrationtests/common_query/ovos_tskill_fakewiki/__init__.py +++ b/test/integrationtests/common_query/ovos_tskill_fakewiki/__init__.py @@ -1,7 +1,7 @@ from ovos_adapt.intent import IntentBuilder from ovos_workshop.skills.common_query_skill import CommonQuerySkill, CQSMatchLevel -from mycroft.skills.core import intent_handler +from ovos_workshop.decorators import intent_handler class FakeWikiSkill(CommonQuerySkill): diff --git a/test/integrationtests/dialog/test_dialog.py b/test/integrationtests/dialog/test_dialog.py index 5343f5c386db..f2c1d7bb23a7 100644 --- a/test/integrationtests/dialog/test_dialog.py +++ b/test/integrationtests/dialog/test_dialog.py @@ -17,9 +17,7 @@ import pathlib import unittest -from mycroft.dialog import get from ovos_utils.dialog import MustacheDialogRenderer, load_dialogs -from ovos_utils.file_utils import resolve_resource_file # TODO - move to ovos-utils @@ -101,24 +99,6 @@ def test_dialog_loader_missing(self): renderer = load_dialogs(template_path) self.assertEqual(renderer.render('test'), 'test') - def test_get(self): - phrase = 'i didn\'t catch that' - res_file = pathlib.Path('text/en-us/').joinpath(phrase + '.dialog') - - resource = resolve_resource_file(str(res_file)) - with open(resource) as f: - results = [line.strip() for line in f] - string = get(phrase) - self.assertIn(string, results) - - # Check that the filename is returned if phrase is missing for lang - string = get(phrase, lang='ne-ne') - self.assertEqual(string, phrase) - - # Check that name is retured if phrase is missing - string = get('testing aardwark') - self.assertEqual(string, 'testing aardwark') - if __name__ == "__main__": unittest.main() diff --git a/test/integrationtests/ovos_tskill_abort/__init__.py b/test/integrationtests/ovos_tskill_abort/__init__.py index 4cb618ccffbd..ea1059fef4d9 100644 --- a/test/integrationtests/ovos_tskill_abort/__init__.py +++ b/test/integrationtests/ovos_tskill_abort/__init__.py @@ -1,6 +1,6 @@ from ovos_workshop.decorators import killable_intent from ovos_workshop.skills.ovos import OVOSSkill -from mycroft.skills import intent_file_handler +from ovos_workshop.decorators import intent_file_handler from time import sleep diff --git a/test/integrationtests/ovos_tskill_abort/setup.py b/test/integrationtests/ovos_tskill_abort/setup.py old mode 100755 new mode 100644 diff --git a/test/unittests/test_common_play_skill.py b/test/integrationtests/test_common_play_skill.py similarity index 99% rename from test/unittests/test_common_play_skill.py rename to test/integrationtests/test_common_play_skill.py index 4c82d689d7a9..85fa9c2c3032 100644 --- a/test/unittests/test_common_play_skill.py +++ b/test/integrationtests/test_common_play_skill.py @@ -1,9 +1,11 @@ from unittest import TestCase, mock from ovos_bus_client.message import Message -from mycroft.skills.common_play_skill import CommonPlaySkill, CPSMatchLevel from ovos_bus_client.apis.ocp import ClassicAudioServiceInterface as AudioService +# TODO - mycroft_legacy +from mycroft.skills.common_play_skill import CommonPlaySkill, CPSMatchLevel + class AnyCallable: """Class matching any callable. diff --git a/test/integrationtests/test_workshop.py b/test/integrationtests/test_workshop.py index fc5e469497aa..f41bbfe2ba0f 100644 --- a/test/integrationtests/test_workshop.py +++ b/test/integrationtests/test_workshop.py @@ -2,8 +2,8 @@ import unittest from os.path import dirname from time import sleep -from mycroft.skills.skill_loader import SkillLoader -from mycroft.skills.mycroft_skill.mycroft_skill import MycroftSkill +from ovos_workshop.skill_launcher import SkillLoader +from ovos_workshop.skills.mycroft_skill import MycroftSkill from ovos_workshop.skills.ovos import OVOSSkill from ovos_utils.messagebus import FakeBus, Message diff --git a/test/integrationtests/util/__init__.py b/test/integrationtests/util/__init__.py deleted file mode 100644 index 051afedb75cd..000000000000 --- a/test/integrationtests/util/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# TODO - move to ovos-utils diff --git a/test/integrationtests/util/commented.json b/test/integrationtests/util/commented.json deleted file mode 100644 index 00a581f6df47..000000000000 --- a/test/integrationtests/util/commented.json +++ /dev/null @@ -1,168 +0,0 @@ -// Leading comment - -{ -// C-style comment - "lang": "en-us", - - // Comment spaced out - "system_unit": "metric", - - // Comment tabbed out - - "time_format": "half", - - // comment and // another inside - "date_format": "MDY", - - // Comment with " inside it - "confirm_listening": true, - - # Python-style comment - "sounds": { -# Commment with no space - "start_listening": "snd/start_listening.wav", - # Comment inside with a tab - # and multiple lines - "end_listening": "snd/end_listening.wav" - // and a final thought - }, - "play_wav_cmdline": "aplay %1", - "play_mp3_cmdline": "mpg123 %1", - "play_ogg_cmdline": "ogg123 %1", - "location": { - "city": { - "code": "Lawrence", - "name": "Lawrence", - "state": { - "code": "KS", - "name": "Kansas", - "country": { - "code": "US", - "name": "United States" - } - } - }, - "coordinate": { - "latitude": 38.971669, - "longitude": -95.23525 - }, - "timezone": { - "code": "America/Chicago", - "name": "Central Standard Time", - "dstOffset": 3600000, - "offset": -21600000 - } - }, - "skills": { - "directory": "~/.local/share/mycroft/skills" - }, - "server": { - "url": "https://api.mycroft.ai", - "version": "v1", - "update": true, - "metrics": false - }, - "websocket": { - "host": "0.0.0.0", - "port": 8181, - "route": "/core", - "ssl": false - }, - "listener": { - "sample_rate": 16000, - "channels": 1, - "wake_word": "hey mycroft", - "phonemes": "HH EY . M AY K R AO F T", - "threshold": 1e-90, - "multiplier": 1.0, - "energy_ratio": 1.5 - }, - "enclosure": { - "port": "/dev/ttyAMA0", - "rate": 9600, - "timeout": 5.0, - "update": true, - "test": false - }, - "log_level": "DEBUG", - "ignore_logs": ["enclosure.mouth.viseme"], - "session": { - "ttl": 180 - }, - "stt": { - "module": "mycroft" - }, - "tts": { - "module": "mimic", - "mimic": { - "voice": "ap" - }, - "espeak": { - "lang": "english-us", - "voice": "m1" - } - }, - - // Mixture - # of types - // of comments - - - "wifi": { - "setup": false - }, - "ConfigurationSkill": { - "max_delay": 60 - }, - "WikipediaSkill": { - "max_results": 5, - "max_phrases": 2 - }, - "WolframAlphaSkill": { - "api_key": "", - "proxy": true - }, - "WeatherSkill": { - "api_key": "", - "proxy": true, - "temperature": "fahrenheit" - }, - "NPRNewsSkill": { - "url_rss": "http://www.npr.org/rss/podcast.php?id=500005" - }, - "AlarmSkill": { - "filename": "alarm.mp3", - "max_delay": 600, - "repeat_time": 20, - "extended_delay": 60 - }, - "ReminderSkill": { - "max_delay": 600, - "repeat_time": 60, - "extended_delay": 60 - }, - "VolumeSkill": { - "default_level": 6, - "min_volume": 0, - "max_volume": 100 - }, - "AudioRecordSkill": { - "filename": "/tmp/mycroft-recording.wav", - "free_disk": 100, - "max_time": 600, - "notify_delay": 5, - "rate": 16000, - "channels": 1 - }, - "SkillInstallerSkill": { - } -} - - - - - -# Trailing comments -# These go on -# and on - // and on diff --git a/test/integrationtests/util/muppets.dict b/test/integrationtests/util/muppets.dict deleted file mode 100644 index dc736bc4c9e2..000000000000 --- a/test/integrationtests/util/muppets.dict +++ /dev/null @@ -1,2 +0,0 @@ -muppet = miss piggy -fraggle = gobo diff --git a/test/integrationtests/util/plain.json b/test/integrationtests/util/plain.json deleted file mode 100644 index eec84631d886..000000000000 --- a/test/integrationtests/util/plain.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "lang": "en-us", - "system_unit": "metric", - "time_format": "half", - "date_format": "MDY", - "confirm_listening": true, - "sounds": { - "start_listening": "snd/start_listening.wav", - "end_listening": "snd/end_listening.wav" - }, - "play_wav_cmdline": "aplay %1", - "play_mp3_cmdline": "mpg123 %1", - "play_ogg_cmdline": "ogg123 %1", - "location": { - "city": { - "code": "Lawrence", - "name": "Lawrence", - "state": { - "code": "KS", - "name": "Kansas", - "country": { - "code": "US", - "name": "United States" - } - } - }, - "coordinate": { - "latitude": 38.971669, - "longitude": -95.23525 - }, - "timezone": { - "code": "America/Chicago", - "name": "Central Standard Time", - "dstOffset": 3600000, - "offset": -21600000 - } - }, - "skills": { - "directory": "~/.local/share/mycroft/skills" - }, - "server": { - "url": "https://api.mycroft.ai", - "version": "v1", - "update": true, - "metrics": false - }, - "websocket": { - "host": "0.0.0.0", - "port": 8181, - "route": "/core", - "ssl": false - }, - "listener": { - "sample_rate": 16000, - "channels": 1, - "wake_word": "hey mycroft", - "phonemes": "HH EY . M AY K R AO F T", - "threshold": 1e-90, - "multiplier": 1.0, - "energy_ratio": 1.5 - }, - "enclosure": { - "port": "/dev/ttyAMA0", - "rate": 9600, - "timeout": 5.0, - "update": true, - "test": false - }, - "log_level": "DEBUG", - "ignore_logs": ["enclosure.mouth.viseme"], - "session": { - "ttl": 180 - }, - "stt": { - "module": "mycroft" - }, - "tts": { - "module": "mimic", - "mimic": { - "voice": "ap" - }, - "espeak": { - "lang": "english-us", - "voice": "m1" - } - }, - "wifi": { - "setup": false - }, - "ConfigurationSkill": { - "max_delay": 60 - }, - "WikipediaSkill": { - "max_results": 5, - "max_phrases": 2 - }, - "WolframAlphaSkill": { - "api_key": "", - "proxy": true - }, - "WeatherSkill": { - "api_key": "", - "proxy": true, - "temperature": "fahrenheit" - }, - "NPRNewsSkill": { - "url_rss": "http://www.npr.org/rss/podcast.php?id=500005" - }, - "AlarmSkill": { - "filename": "alarm.mp3", - "max_delay": 600, - "repeat_time": 20, - "extended_delay": 60 - }, - "ReminderSkill": { - "max_delay": 600, - "repeat_time": 60, - "extended_delay": 60 - }, - "VolumeSkill": { - "default_level": 6, - "min_volume": 0, - "max_volume": 100 - }, - "AudioRecordSkill": { - "filename": "/tmp/mycroft-recording.wav", - "free_disk": 100, - "max_time": 600, - "notify_delay": 5, - "rate": 16000, - "channels": 1 - }, - "SkillInstallerSkill": { - } -} diff --git a/test/integrationtests/util/test_audio_utils.py b/test/integrationtests/util/test_audio_utils.py deleted file mode 100644 index 626b0f5a0574..000000000000 --- a/test/integrationtests/util/test_audio_utils.py +++ /dev/null @@ -1,138 +0,0 @@ - -from unittest import TestCase, mock - -from mycroft.util import (play_ogg, play_mp3, play_wav, play_audio_file) - -class Anything: - """Class matching any object. - - Useful for assert_called_with arguments. - """ - def __eq__(self, other): - return True - - -test_config = { - 'play_wav_cmdline': 'mock_wav %1', - 'play_mp3_cmdline': 'mock_mp3 %1', - 'play_ogg_cmdline': 'mock_ogg %1' -} - - -@mock.patch('ovos_utils.sound.read_mycroft_config') -@mock.patch('ovos_utils.sound.subprocess') -class TestPlaySounds(TestCase): - def test_play_ogg(self, mock_subprocess, mock_conf): - mock_conf.return_value = test_config - play_ogg('insult.ogg') - mock_subprocess.Popen.assert_called_once_with(['mock_ogg', - 'insult.ogg'], - env=Anything()) - - @mock.patch('ovos_utils.sound.LOG') - def test_play_ogg_file_not_found(self, mock_log, - mock_subprocess, mock_conf): - """Test that simple log is raised when subprocess can't find command. - """ - def raise_filenotfound(*arg, **kwarg): - raise FileNotFoundError('TEST FILE NOT FOUND') - - mock_subprocess.Popen.side_effect = raise_filenotfound - mock_conf.return_value = test_config - self.assertEqual(play_ogg('insult.ogg'), None) - mock_log.error.called_once_with(Anything()) - - @mock.patch('ovos_utils.sound.LOG') - def test_play_ogg_exception(self, mock_log, - mock_subprocess, mock_conf): - """Test that stack trace is provided when unknown excpetion occurs""" - def raise_exception(*arg, **kwarg): - raise Exception - - mock_subprocess.Popen.side_effect = raise_exception - mock_conf.return_value = test_config - self.assertEqual(play_ogg('insult.ogg'), None) - mock_log.exception.called_once_with(Anything()) - - def test_play_mp3(self, mock_subprocess, mock_conf): - mock_conf.return_value = test_config - play_mp3('praise.mp3') - mock_subprocess.Popen.assert_called_once_with(['mock_mp3', - 'praise.mp3'], - env=Anything()) - - @mock.patch('ovos_utils.sound.LOG') - def test_play_mp3_file_not_found(self, mock_log, - mock_subprocess, mock_conf): - """Test that simple log is raised when subprocess can't find command. - """ - def raise_filenotfound(*arg, **kwarg): - raise FileNotFoundError('TEST FILE NOT FOUND') - - mock_subprocess.Popen.side_effect = raise_filenotfound - mock_conf.return_value = test_config - self.assertEqual(play_mp3('praise.mp3'), None) - mock_log.error.called_once_with(Anything()) - - @mock.patch('ovos_utils.sound.LOG') - def test_play_mp3_exception(self, mock_log, - mock_subprocess, mock_conf): - """Test that stack trace is provided when unknown excpetion occurs""" - def raise_exception(*arg, **kwarg): - raise Exception - - mock_subprocess.Popen.side_effect = raise_exception - mock_conf.return_value = test_config - self.assertEqual(play_mp3('praise.mp3'), None) - mock_log.exception.called_once_with(Anything()) - - def test_play_wav(self, mock_subprocess, mock_conf): - mock_conf.return_value = test_config - play_wav('indifference.wav') - mock_subprocess.Popen.assert_called_once_with(['mock_wav', - 'indifference.wav'], - env=Anything()) - - @mock.patch('ovos_utils.sound.LOG') - def test_play_wav_file_not_found(self, mock_log, - mock_subprocess, mock_conf): - """Test that simple log is raised when subprocess can't find command. - """ - def raise_filenotfound(*arg, **kwarg): - raise FileNotFoundError('TEST FILE NOT FOUND') - - mock_subprocess.Popen.side_effect = raise_filenotfound - mock_conf.return_value = test_config - self.assertEqual(play_wav('indifference.wav'), None) - mock_log.error.called_once_with(Anything()) - - @mock.patch('ovos_utils.sound.LOG') - def test_play_wav_exception(self, mock_log, - mock_subprocess, mock_conf): - """Test that stack trace is provided when unknown excpetion occurs""" - def raise_exception(*arg, **kwarg): - raise Exception - - mock_subprocess.Popen.side_effect = raise_exception - mock_conf.return_value = test_config - self.assertEqual(play_wav('indifference.wav'), None) - mock_log.exception.called_once_with(Anything()) - - def test_play_audio_file(self, mock_subprocess, mock_conf): - mock_conf.return_value = test_config - play_audio_file('indifference.wav') - mock_subprocess.Popen.assert_called_once_with(['mock_wav', - 'indifference.wav'], - env=Anything()) - mock_subprocess.Popen.reset_mock() - - play_audio_file('praise.mp3') - mock_subprocess.Popen.assert_called_once_with(['mock_mp3', - 'praise.mp3'], - env=Anything()) - mock_subprocess.Popen.reset_mock() - mock_conf.return_value = test_config - play_audio_file('insult.ogg') - mock_subprocess.Popen.assert_called_once_with(['mock_ogg', - 'insult.ogg'], - env=Anything()) diff --git a/test/integrationtests/util/test_download.py b/test/integrationtests/util/test_download.py deleted file mode 100644 index 7b11dbb5d455..000000000000 --- a/test/integrationtests/util/test_download.py +++ /dev/null @@ -1,109 +0,0 @@ - -from threading import Event -from unittest import TestCase, mock - -from mycroft.util.download import (download, _running_downloads, - _get_download_tmp) -from mycroft.util.file_utils import get_temp_path - -TEST_URL = 'http://example.com/mycroft-test.tar.gz' -TEST_DEST = get_temp_path('file.tar.gz') - - -@mock.patch('mycroft.util.download.subprocess') -@mock.patch('mycroft.util.download.os') -class TestDownload(TestCase): - def setUp(self): - """Remove any cached instance.""" - for key in list(_running_downloads.keys()): - _running_downloads.pop(key) - - def test_download_basic(self, mock_os, mock_subprocess): - """Test the basic download call.""" - mock_subprocess.call.return_value = 0 - - downloader = download(url=TEST_URL, - dest=TEST_DEST) - downloader.join() - mock_subprocess.call.assert_called_once_with(['wget', '-c', TEST_URL, - '-O', - TEST_DEST + '.part', - '--tries=20', - '--read-timeout=5']) - self.assertTrue(downloader.done) - - def test_download_with_header(self, mock_os, mock_subprocess): - """Test download with specific header.""" - mock_subprocess.call.return_value = 0 - - test_hdr = 'TEST_HEADER' - downloader = download(url=TEST_URL, - dest=TEST_DEST, - header=test_hdr) - downloader.join() - - self.assertTrue(downloader.done) - mock_subprocess.call.assert_called_once_with(['wget', '-c', TEST_URL, - '-O', - TEST_DEST + '.part', - '--tries=20', - '--read-timeout=5', - '--header=' + test_hdr]) - - def test_download_callback(self, mock_os, mock_subprocess): - """Check that callback function is called with correct destination.""" - mock_subprocess.call.return_value = 0 - action_called_with = None - - def action(dest): - nonlocal action_called_with - action_called_with = dest - - downloader = download(url=TEST_URL, - dest=TEST_DEST, - complete_action=action) - downloader.join() - - self.assertTrue(downloader.done) - self.assertEqual(action_called_with, TEST_DEST) - - def test_download_cache(self, mock_os, mock_subprocess): - """Make sure that a cached download is used if exists.""" - - transfer_done = Event() - - def wget_call(*args, **kwargs): - nonlocal transfer_done - transfer_done.wait() - return 0 - - downloader = download(url=TEST_URL, - dest=TEST_DEST) - downloader2 = download(url=TEST_URL, - dest=TEST_DEST) - # When called with the same args a cached download in progress should - # be returned instead of a new one. - self.assertTrue(downloader is downloader2) - transfer_done.set() - downloader.join() - - -@mock.patch('mycroft.util.download.glob') -class TestGetTemp(TestCase): - def test_no_existing(self, mock_glob): - mock_glob.return_value = [] - dest = get_temp_path('test') - self.assertEqual(_get_download_tmp(dest), dest + '.part') - - def test_existing(self, mock_glob): - mock_glob.return_value = [get_temp_path('test.part')] - dest = get_temp_path('test') - self.assertEqual(_get_download_tmp(dest), dest + '.part.1') - - def test_multiple_existing(self, mock_glob): - mock_glob.return_value = [get_temp_path('test.part'), - get_temp_path('test.part.1'), - get_temp_path('test.part.2')] - - dest = get_temp_path('test') - self.assertEqual(_get_download_tmp(dest), dest + '.part.3') diff --git a/test/integrationtests/util/test_json_helper.py b/test/integrationtests/util/test_json_helper.py deleted file mode 100644 index 76b31e28eead..000000000000 --- a/test/integrationtests/util/test_json_helper.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import json -import unittest - -from os.path import dirname, join - -from mycroft.util.json_helper import load_commented_json - - -class TestFileLoad(unittest.TestCase): - - def test_load(self): - root_dir = dirname(__file__) - # Load normal JSON file - plainfile = join(root_dir, 'plain.json') - with open(plainfile, 'r') as f: - data_from_plain = json.load(f) - - # Load commented JSON file - commentedfile = join(root_dir, 'commented.json') - data_from_commented = load_commented_json(commentedfile) - - # Should be the same... - self.assertEqual(data_from_commented, data_from_plain) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/integrationtests/util/test_log.py b/test/integrationtests/util/test_log.py deleted file mode 100644 index 42390f965ebc..000000000000 --- a/test/integrationtests/util/test_log.py +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import unittest -import sys -from io import StringIO -from threading import Thread -from mycroft.util.log import LOG - - -class CaptureLogs(list): - def __init__(self): - list.__init__(self) - self._stdout = None - self._stringio = None - - def __enter__(self): - self._stdout = sys.stdout - sys.stdout = self._stringio = StringIO() - LOG.init() - return self - - def __exit__(self, *args): - self.extend(self._stringio.getvalue().splitlines()) - del self._stringio # free up some memory - sys.stdout = self._stdout - LOG.init() - - -class TestLog(unittest.TestCase): - def test_threads(self): - with CaptureLogs() as output: - def test_logging(): - LOG.debug('testing debug') - LOG.info('testing info') - LOG.warning('testing warning') - LOG.error('testing error') - LOG('testing custom').debug('test') - - threads = [] - for _ in range(100): - t = Thread(target=test_logging) - t.start() - threads.append(t) - - for t in threads: - t.join() - - assert len(output) > 0 - - for line in output: - found_msg = False - for msg in ['debug', 'info', 'warning', 'error', 'custom']: - if 'testing ' + msg in line: - found_msg = True - assert found_msg - - -if __name__ == "__main__": - unittest.main() diff --git a/test/integrationtests/util/test_monotonic_event.py b/test/integrationtests/util/test_monotonic_event.py deleted file mode 100644 index 9c7d27770e01..000000000000 --- a/test/integrationtests/util/test_monotonic_event.py +++ /dev/null @@ -1,32 +0,0 @@ -from threading import Thread -from time import sleep -from unittest import TestCase, mock - -from mycroft.util.monotonic_event import MonotonicEvent - - -class MonotonicEventTest(TestCase): - def test_wait_set(self): - event = MonotonicEvent() - event.set() - self.assertTrue(event.wait()) - - def test_wait_timeout(self): - event = MonotonicEvent() - self.assertFalse(event.wait(0.1)) - - def test_wait_set_with_timeout(self): - wait_result = False - event = MonotonicEvent() - - def wait_event(): - nonlocal wait_result - wait_result = event.wait(30) - - wait_thread = Thread(target=wait_event) - wait_thread.start() - - sleep(0.1) - event.set() - wait_thread.join() - self.assertTrue(wait_result) diff --git a/test/integrationtests/util/test_network_utils.py b/test/integrationtests/util/test_network_utils.py deleted file mode 100644 index ed7dcc1653be..000000000000 --- a/test/integrationtests/util/test_network_utils.py +++ /dev/null @@ -1,52 +0,0 @@ -from unittest import TestCase, mock - -from mycroft.util.network_utils import connected - - -class TestNetworkConnected(TestCase): - def test_default_config_succeeds(self): - """Check that happy path succeeds""" - self.assertTrue(connected()) - - -@mock.patch('ovos_config.config.Configuration') -class TestNetworkFailure(TestCase): - - def test_dns_and_ncsi_fail(self, mock_conf): - """Check that DNS and NCSI failure results in False response""" - mock_conf.return_value = { - "network_tests": { - "dns_primary": "127.0.0.1", - "dns_secondary": "127.0.0.1", - "web_url": "https://www.google.com", - "ncsi_endpoint": "http://www.msftncsi.com/ncsi.txt", - "ncsi_expected_text": "Unexpected text" - } - } - self.assertFalse(connected()) - - def test_secondary_dns_succeeds(self, mock_conf): - """Check that only primary DNS failing still succeeds""" - mock_conf.return_value = { - "network_tests": { - "dns_primary": "127.0.0.1", - "dns_secondary": "8.8.4.4", - "web_url": "https://www.google.com", - "ncsi_endpoint": "http://www.msftncsi.com/ncsi.txt", - "ncsi_expected_text": "Microsoft NCSI" - } - } - self.assertTrue(connected()) - - def test_dns_success_url_fail(self, mock_conf): - """Check that URL connection failure results in False response""" - mock_conf.return_value = { - "network_tests": { - "dns_primary": "8.8.8.8", - "dns_secondary": "8.8.4.4", - "web_url": "https://test.invalid", - "ncsi_endpoint": "http://www.msftncsi.com/ncsi.txt", - "ncsi_expected_text": "Microsoft NCSI" - } - } - self.assertFalse(connected()) diff --git a/test/integrationtests/util/test_parse.py b/test/integrationtests/util/test_parse.py deleted file mode 100644 index 6711a42120db..000000000000 --- a/test/integrationtests/util/test_parse.py +++ /dev/null @@ -1,263 +0,0 @@ -# -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import unittest -from datetime import datetime, timedelta - -from mycroft.configuration.locale import load_language, get_default_tz -from lingua_franca.internal import FunctionNotLocalizedError - -from mycroft.util.parse import ( - extract_datetime, - extract_duration, - extract_number, - extract_numbers, - fuzzy_match, - get_gender, - match_one, - normalize -) -from mycroft.util.time import default_timezone - - -load_language("en-us") - - -class TestFuzzyMatch(unittest.TestCase): - def test_matches(self): - self.assertTrue(fuzzy_match("you and me", "you and me") >= 1.0) - self.assertTrue(fuzzy_match("you and me", "you") < 0.5) - self.assertTrue(fuzzy_match("You", "you") > 0.5) - self.assertTrue(fuzzy_match("you and me", "you") == - fuzzy_match("you", "you and me")) - self.assertTrue(fuzzy_match("you and me", "he or they") < 0.2) - - def test_match_one(self): - # test list of choices - choices = ['frank', 'kate', 'harry', 'henry'] - self.assertEqual(match_one('frank', choices)[0], 'frank') - self.assertEqual(match_one('fran', choices)[0], 'frank') - self.assertEqual(match_one('enry', choices)[0], 'henry') - self.assertEqual(match_one('katt', choices)[0], 'kate') - # test dictionary of choices - choices = {'frank': 1, 'kate': 2, 'harry': 3, 'henry': 4} - self.assertEqual(match_one('frank', choices)[0], 1) - self.assertEqual(match_one('enry', choices)[0], 4) - - -class TestNormalize(unittest.TestCase): - def test_articles(self): - self.assertEqual(normalize("this is a test", remove_articles=True), - "this is test") - self.assertEqual(normalize("this is the test", remove_articles=True), - "this is test") - self.assertEqual(normalize("and another test", remove_articles=True), - "and another test") - self.assertEqual(normalize("this is an extra test", - remove_articles=False), - "this is an extra test") - - def test_spaces(self): - self.assertEqual(normalize(" this is a test"), - "this is test") - self.assertEqual(normalize(" this is a test "), - "this is test") - self.assertEqual(normalize(" this is one test"), - "this is 1 test") - - def test_numbers(self): - self.assertEqual(normalize("this is a one two three test"), - "this is 1 2 3 test") - self.assertEqual(normalize(" it's a four five six test"), - "it is 4 5 6 test") - self.assertEqual(normalize("it's a seven eight nine test"), - "it is 7 8 9 test") - self.assertEqual(normalize("it's a seven eight nine test"), - "it is 7 8 9 test") - self.assertEqual(normalize("that's a ten eleven twelve test"), - "that is 10 11 12 test") - self.assertEqual(normalize("that's a thirteen fourteen test"), - "that is 13 14 test") - self.assertEqual(normalize("that's fifteen sixteen seventeen"), - "that is 15 16 17") - self.assertEqual(normalize("that's eighteen nineteen twenty"), - "that is 18 19 20") - self.assertEqual(normalize("that's one nineteen twenty two"), - "that is 1 19 22") - self.assertEqual(normalize("that's one hundred"), - "that is 100") - self.assertEqual(normalize("that's one two twenty two"), - "that is 1 2 22") - self.assertEqual(normalize("that's one and a half"), - "that is 1 and half") - self.assertEqual(normalize("that's one and a half and five six"), - "that is 1 and half and 5 6") - - def test_contractions(self): - self.assertEqual(normalize("ain't"), "is not") - self.assertEqual(normalize("aren't"), "are not") - self.assertEqual(normalize("can't"), "can not") - self.assertEqual(normalize("could've"), "could have") - self.assertEqual(normalize("couldn't"), "could not") - self.assertEqual(normalize("didn't"), "did not") - self.assertEqual(normalize("doesn't"), "does not") - self.assertEqual(normalize("don't"), "do not") - self.assertEqual(normalize("gonna"), "going to") - self.assertEqual(normalize("gotta"), "got to") - self.assertEqual(normalize("hadn't"), "had not") - self.assertEqual(normalize("hadn't have"), "had not have") - self.assertEqual(normalize("hasn't"), "has not") - self.assertEqual(normalize("haven't"), "have not") - # TODO: Ambiguous with "he had" - self.assertEqual(normalize("he'd"), "he would") - self.assertEqual(normalize("he'll"), "he will") - # TODO: Ambiguous with "he has" - self.assertEqual(normalize("he's"), "he is") - # TODO: Ambiguous with "how would" - self.assertEqual(normalize("how'd"), "how did") - self.assertEqual(normalize("how'll"), "how will") - # TODO: Ambiguous with "how has" and "how does" - self.assertEqual(normalize("how's"), "how is") - # TODO: Ambiguous with "I had" - self.assertEqual(normalize("I'd"), "I would") - self.assertEqual(normalize("I'll"), "I will") - self.assertEqual(normalize("I'm"), "I am") - self.assertEqual(normalize("I've"), "I have") - self.assertEqual(normalize("I haven't"), "I have not") - self.assertEqual(normalize("isn't"), "is not") - self.assertEqual(normalize("it'd"), "it would") - self.assertEqual(normalize("it'll"), "it will") - # TODO: Ambiguous with "it has" - self.assertEqual(normalize("it's"), "it is") - self.assertEqual(normalize("it isn't"), "it is not") - self.assertEqual(normalize("mightn't"), "might not") - self.assertEqual(normalize("might've"), "might have") - self.assertEqual(normalize("mustn't"), "must not") - self.assertEqual(normalize("mustn't have"), "must not have") - self.assertEqual(normalize("must've"), "must have") - self.assertEqual(normalize("needn't"), "need not") - self.assertEqual(normalize("oughtn't"), "ought not") - self.assertEqual(normalize("shan't"), "shall not") - # TODO: Ambiguous wiht "she had" - self.assertEqual(normalize("she'd"), "she would") - self.assertEqual(normalize("she hadn't"), "she had not") - self.assertEqual(normalize("she'll"), "she will") - self.assertEqual(normalize("she's"), "she is") - self.assertEqual(normalize("she isn't"), "she is not") - self.assertEqual(normalize("should've"), "should have") - self.assertEqual(normalize("shouldn't"), "should not") - self.assertEqual(normalize("shouldn't have"), "should not have") - self.assertEqual(normalize("somebody's"), "somebody is") - # TODO: Ambiguous with "someone had" - self.assertEqual(normalize("someone'd"), "someone would") - self.assertEqual(normalize("someone hadn't"), "someone had not") - self.assertEqual(normalize("someone'll"), "someone will") - # TODO: Ambiguous with "someone has" - self.assertEqual(normalize("someone's"), "someone is") - self.assertEqual(normalize("that'll"), "that will") - # TODO: Ambiguous with "that has" - self.assertEqual(normalize("that's"), "that is") - # TODO: Ambiguous with "that had" - self.assertEqual(normalize("that'd"), "that would") - # TODO: Ambiguous with "there had" - self.assertEqual(normalize("there'd"), "there would") - self.assertEqual(normalize("there're"), "there are") - # TODO: Ambiguous with "there has" - self.assertEqual(normalize("there's"), "there is") - # TODO: Ambiguous with "they had" - self.assertEqual(normalize("they'd"), "they would") - self.assertEqual(normalize("they'll"), "they will") - self.assertEqual(normalize("they won't have"), "they will not have") - self.assertEqual(normalize("they're"), "they are") - self.assertEqual(normalize("they've"), "they have") - self.assertEqual(normalize("they haven't"), "they have not") - self.assertEqual(normalize("wasn't"), "was not") - # TODO: Ambiguous wiht "we had" - self.assertEqual(normalize("we'd"), "we would") - self.assertEqual(normalize("we would've"), "we would have") - self.assertEqual(normalize("we wouldn't"), "we would not") - self.assertEqual(normalize("we wouldn't have"), "we would not have") - self.assertEqual(normalize("we'll"), "we will") - self.assertEqual(normalize("we won't have"), "we will not have") - self.assertEqual(normalize("we're"), "we are") - self.assertEqual(normalize("we've"), "we have") - self.assertEqual(normalize("weren't"), "were not") - self.assertEqual(normalize("what'd"), "what did") - self.assertEqual(normalize("what'll"), "what will") - self.assertEqual(normalize("what're"), "what are") - # TODO: Ambiguous with "what has" / "what does") - self.assertEqual(normalize("whats"), "what is") - self.assertEqual(normalize("what's"), "what is") - self.assertEqual(normalize("what've"), "what have") - # TODO: Ambiguous with "when has" - self.assertEqual(normalize("when's"), "when is") - self.assertEqual(normalize("where'd"), "where did") - # TODO: Ambiguous with "where has" / where does" - self.assertEqual(normalize("where's"), "where is") - self.assertEqual(normalize("where've"), "where have") - # TODO: Ambiguous with "who had" "who did") - self.assertEqual(normalize("who'd"), "who would") - self.assertEqual(normalize("who'd've"), "who would have") - self.assertEqual(normalize("who'll"), "who will") - self.assertEqual(normalize("who're"), "who are") - # TODO: Ambiguous with "who has" / "who does" - self.assertEqual(normalize("who's"), "who is") - self.assertEqual(normalize("who've"), "who have") - self.assertEqual(normalize("why'd"), "why did") - self.assertEqual(normalize("why're"), "why are") - # TODO: Ambiguous with "why has" / "why does" - self.assertEqual(normalize("why's"), "why is") - self.assertEqual(normalize("won't"), "will not") - self.assertEqual(normalize("won't've"), "will not have") - self.assertEqual(normalize("would've"), "would have") - self.assertEqual(normalize("wouldn't"), "would not") - self.assertEqual(normalize("wouldn't've"), "would not have") - self.assertEqual(normalize("ya'll"), "you all") - self.assertEqual(normalize("y'all"), "you all") - self.assertEqual(normalize("y'ain't"), "you are not") - # TODO: Ambiguous with "you had" - self.assertEqual(normalize("you'd"), "you would") - self.assertEqual(normalize("you'd've"), "you would have") - self.assertEqual(normalize("you'll"), "you will") - self.assertEqual(normalize("you're"), "you are") - self.assertEqual(normalize("you aren't"), "you are not") - self.assertEqual(normalize("you've"), "you have") - self.assertEqual(normalize("you haven't"), "you have not") - - def test_combinations(self): - self.assertEqual(normalize("I couldn't have guessed there'd be two"), - "I could not have guessed there would be 2") - self.assertEqual(normalize("I wouldn't have"), "I would not have") - self.assertEqual(normalize("I hadn't been there"), - "I had not been there") - self.assertEqual(normalize("I would've"), "I would have") - self.assertEqual(normalize("it hadn't"), "it had not") - self.assertEqual(normalize("it hadn't have"), "it had not have") - self.assertEqual(normalize("it would've"), "it would have") - self.assertEqual(normalize("she wouldn't have"), "she would not have") - self.assertEqual(normalize("she would've"), "she would have") - self.assertEqual(normalize("someone wouldn't have"), - "someone would not have") - self.assertEqual(normalize("someone would've"), "someone would have") - self.assertEqual(normalize("what's the weather like"), - "what is weather like") - self.assertEqual(normalize("that's what I told you"), - "that is what I told you") - - self.assertEqual(normalize("whats 8 + 4"), "what is 8 + 4") - - -if __name__ == "__main__": - unittest.main() diff --git a/test/integrationtests/util/test_platform.py b/test/integrationtests/util/test_platform.py deleted file mode 100644 index 431d14438a93..000000000000 --- a/test/integrationtests/util/test_platform.py +++ /dev/null @@ -1,11 +0,0 @@ -from unittest import TestCase, mock - -from mycroft.util import get_arch - - -class TestPlatform(TestCase): - @mock.patch('os.uname') - def test_get_arch(self, mock_uname): - mock_uname.return_value = ('Linux', 'Woodstock', '4.15.0-39-generic', - 'Awesome test system Mark 7', 'x86_64') - self.assertEqual(get_arch(), 'x86_64') diff --git a/test/integrationtests/util/test_plugins.py b/test/integrationtests/util/test_plugins.py deleted file mode 100644 index de6e8a059634..000000000000 --- a/test/integrationtests/util/test_plugins.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2020 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -from unittest import TestCase, mock - -import mycroft.util.plugins as mycroft_plugins - - -def get_plug_mock(name): - load_mock = mock.Mock(name=name) - load_mock.name = name - plug_mock = mock.Mock(name=name) - plug_mock.name = name - plug_mock.load.return_value = load_mock - return plug_mock - - -def mock_iter_entry_points(plug_type): - """Function to return mocked plugins.""" - plugs = { - 'mycroft.plugins.tts': [get_plug_mock('dummy'), - get_plug_mock('remote')], - 'mycroft.plugins.stt': [get_plug_mock('dummy'), - get_plug_mock('deepspeech')] - } - return plugs.get(plug_type, []) - - -@mock.patch('mycroft.util.plugins.pkg_resources') -class TestPlugins(TestCase): - def test_load_existing(self, mock_pkg_res): - """Ensure that plugin objects are returned if found.""" - mock_pkg_res.iter_entry_points.side_effect = mock_iter_entry_points - - # Load a couple of existing modules and verify that they're Ok - plug = mycroft_plugins.load_plugin('mycroft.plugins.tts', 'dummy') - self.assertEqual(plug.name, 'dummy') - plug = mycroft_plugins.load_plugin('mycroft.plugins.stt', 'deepspeech') - self.assertEqual(plug.name, 'deepspeech') - - def test_load_nonexisting(self, mock_pkg_res): - """Ensure that the return value is None when no plugin is found.""" - mock_pkg_res.iter_entry_points.side_effect = mock_iter_entry_points - plug = mycroft_plugins.load_plugin('mycroft.plugins.tts', 'blah') - self.assertEqual(plug, None) diff --git a/test/integrationtests/util/test_process_utils.py b/test/integrationtests/util/test_process_utils.py deleted file mode 100644 index d0f329dad173..000000000000 --- a/test/integrationtests/util/test_process_utils.py +++ /dev/null @@ -1,205 +0,0 @@ -from unittest import TestCase, mock - -from mycroft.util.process_utils import (_update_log_level, bus_logging_status, - create_daemon, ProcessStatus, - StatusCallbackMap) - - -class TestCreateDaemon(TestCase): - def test_create(self): - """Make sure deamon thread is created, and runs the expected function. - """ - thread_ran = False - - def thread_func(): - nonlocal thread_ran - thread_ran = True - - thread = create_daemon(thread_func) - self.assertTrue(thread.daemon) - self.assertTrue(thread_ran) - thread.join() - - def test_create_with_args(self): - """Check that the args and kwargs is passed to the thread function.""" - test_args = (1, 2, 3) - test_kwargs = {'meaning': 42, 'borg': '7 of 9'} - passed_args = None - passed_kwargs = None - - def thread_func(*args, **kwargs): - nonlocal passed_args - nonlocal passed_kwargs - passed_args = args - passed_kwargs = kwargs - - thread = create_daemon(thread_func, test_args, test_kwargs) - thread.join() - self.assertEqual(test_args, passed_args) - self.assertEqual(test_kwargs, passed_kwargs) - - -@mock.patch('mycroft.util.process_utils.LOG') -class TestUpdateLogLevel(TestCase): - def test_no_data(self, mock_log): - mock_log.level = 'UNSET' - log_msg = {'msg_type': 'mycroft.debug.log', - 'data': {}} - _update_log_level(log_msg, 'Test') - self.assertEqual(mock_log.level, 'UNSET') - - def test_set_debug(self, mock_log): - mock_log.level = 'UNSET' - log_msg = {'type': 'mycroft.debug.log', - 'data': {'level': 'DEBUG'}} - _update_log_level(log_msg, 'Test') - self.assertEqual(mock_log.level, 'DEBUG') - - def test_set_lowecase_debug(self, mock_log): - mock_log.level = 'UNSET' - log_msg = {'type': 'mycroft.debug.log', - 'data': {'level': 'debug'}} - _update_log_level(log_msg, 'Test') - self.assertEqual(mock_log.level, 'DEBUG') - - def test_set_invalid_level(self, mock_log): - mock_log.level = 'UNSET' - log_msg = {'type': 'mycroft.debug.log', - 'data': {'level': 'snowcrash'}} - _update_log_level(log_msg, 'Test') - self.assertEqual(mock_log.level, 'UNSET') - - def test_set_bus_logging(self, mock_log): - mock_log.level = 'UNSET' - log_msg = {'type': 'mycroft.debug.log', - 'data': {'bus': True}} - self.assertFalse(bus_logging_status()) - _update_log_level(log_msg, 'Test') - self.assertTrue(bus_logging_status()) - - -def create_mock_message(msg_type): - """Creates a mock with members matching a messagebus Message.""" - m = mock.Mock() - m.msg_type = msg_type - m.data = {} - m.context = {} - return m - - -class TestProcessStatus(TestCase): - def test_callbacks(self): - """Assert that callbacks are called as expected.""" - started = False - alive = False - ready = False - stopping = False - error = False - - def started_hook(): - nonlocal started - started = True - - def alive_hook(): - nonlocal alive - alive = True - - def ready_hook(): - nonlocal ready - ready = True - - def stopping_hook(): - nonlocal stopping - stopping = True - - def error_hook(err): - nonlocal error - error = err - - callbacks = StatusCallbackMap(on_started=started_hook, - on_alive=alive_hook, on_ready=ready_hook, - on_stopping=stopping_hook, - on_error=error_hook) - status = ProcessStatus('test', mock.Mock(), callbacks) - - status.set_started() - self.assertTrue(started) - - status.set_alive() - self.assertTrue(alive) - - status.set_ready() - self.assertTrue(ready) - - status.set_stopping() - self.assertTrue(stopping) - - err_msg = 'Test error' - status.set_error(err_msg) - self.assertEqual(err_msg, error) - - def test_init_status(self): - """Check that the status is neither alive nor ready after init.""" - status = ProcessStatus('test', mock.Mock()) - self.assertFalse(status.check_alive()) - self.assertFalse(status.check_ready()) - - def test_alive_status(self): - status = ProcessStatus('test', mock.Mock()) - status.set_alive() - self.assertTrue(status.check_alive()) - self.assertFalse(status.check_ready()) - - def test_ready_status(self): - """Check that alive and ready reports correctly.""" - status = ProcessStatus('test', mock.Mock()) - status.set_alive() - status.set_ready() - self.assertTrue(status.check_alive()) - self.assertTrue(status.check_ready()) - - def test_direct_to_ready_status(self): - """Ensure that process status indicates alive if only ready is set.""" - status = ProcessStatus('test', mock.Mock()) - status.set_ready() - self.assertTrue(status.check_alive()) - self.assertTrue(status.check_ready()) - - def test_error_status(self): - """Ensure that error resets the status and to not alive or ready.""" - status = ProcessStatus('test', mock.Mock()) - status.set_ready() - status.set_error() - self.assertFalse(status.check_alive()) - self.assertFalse(status.check_ready()) - - def test_ready_message(self): - """Assert that ready message contains the correct status.""" - status = ProcessStatus('test', mock.Mock()) - - # Check status when not ready - msg = create_mock_message('mycroft.test.all_loaded') - status.check_ready(msg) - msg.response.assert_called_with(data={'status': False}) - - # Check status when ready - status.set_ready() - msg = create_mock_message('mycroft.test.all_loaded') - status.check_ready(msg) - msg.response.assert_called_with(data={'status': True}) - - def test_is_alive__message(self): - """Assert that is_alive message contains the correct status.""" - status = ProcessStatus('test', mock.Mock()) - status.set_started() - - # Check status when not alive - msg = create_mock_message('mycroft.test.is_alive') - status.check_alive(msg) - msg.response.assert_called_with(data={'status': False}) - - # Check status when ready which should also indicate alive - status.set_ready() - msg = create_mock_message('mycroft.test.is_isalive') - status.check_alive(msg) - msg.response.assert_called_with(data={'status': True}) diff --git a/test/integrationtests/util/test_signal.py b/test/integrationtests/util/test_signal.py deleted file mode 100644 index 93a142ee7dab..000000000000 --- a/test/integrationtests/util/test_signal.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2017 Mycroft AI Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -import unittest -from shutil import rmtree - -from os.path import exists, isfile, join -from tempfile import gettempdir - -from mycroft.util import create_signal, check_for_signal - - -class TestSignals(unittest.TestCase): - def setUp(self): - if exists(join(gettempdir(), 'mycroft')): - rmtree(join(gettempdir(), 'mycroft')) - - def test_create_signal(self): - create_signal('test_signal') - self.assertTrue(isfile(join(gettempdir(), - 'mycroft/ipc/signal/test_signal'))) - - def test_check_signal(self): - if exists(join(gettempdir(), 'mycroft')): - rmtree(join(gettempdir(), 'mycroft')) - # check that signal is not found if file does not exist - self.assertFalse(check_for_signal('test_signal')) - - # Check that the signal is found when created - create_signal('test_signal') - self.assertTrue(check_for_signal('test_signal')) - # Check that the signal is removed after use - self.assertFalse(isfile(join(gettempdir(), - 'mycroft/ipc/signal/test_signal'))) - - -if __name__ == "__main__": - unittest.main() diff --git a/test/integrationtests/util/test_string_utils.py b/test/integrationtests/util/test_string_utils.py deleted file mode 100644 index fd65bd16df06..000000000000 --- a/test/integrationtests/util/test_string_utils.py +++ /dev/null @@ -1,9 +0,0 @@ -from unittest import TestCase -from mycroft.util import camel_case_split - - -class TestStringFunctions(TestCase): - def test_camel_case_split(self): - """Check that camel case string is split properly.""" - self.assertEqual(camel_case_split('MyCoolSkill'), 'My Cool Skill') - self.assertEqual(camel_case_split('MyCOOLSkill'), 'My COOL Skill') diff --git a/test/integrationtests/util/test_time.py b/test/integrationtests/util/test_time.py deleted file mode 100644 index 04ad97e86742..000000000000 --- a/test/integrationtests/util/test_time.py +++ /dev/null @@ -1,91 +0,0 @@ -from datetime import datetime -from dateutil.tz import tzfile, tzlocal, gettz -from unittest import TestCase, mock -from mycroft.configuration import setup_locale, set_default_tz -from mycroft.util.time import (default_timezone, now_local, now_utc, to_utc, - to_local, to_system) - -test_config = { - 'location': { - 'timezone': { - 'code': 'America/Chicago', - 'name': 'Central Standard Time', - 'dstOffset': 3600000, # Daylight saving offset in milliseconds - 'offset': -21600000 # Timezone offset in milliseconds - } - } -} - - -@mock.patch('mycroft.configuration.Configuration') -class TestTimeFuncs(TestCase): - def test_default_timezone(self, mock_conf): - # Test missing tz-info - # TODO how to ensure setup_locale() not called by a previous test? - # mock_conf.get.return_value = {} - # self.assertEqual(default_timezone(), tzlocal()) - - # Test tz from config - mock_conf.return_value = test_config - setup_locale() # will load (test) tz from config - self.assertEqual(default_timezone(), - tzfile('/usr/share/zoneinfo/America/Chicago')) - - # Test changing tz - set_default_tz(tzlocal()) - self.assertEqual(default_timezone(), tzlocal()) - - @mock.patch('mycroft.util.time.datetime') - def test_now_local(self, mock_dt, mock_conf): - mock_conf.return_value = test_config - setup_locale() - - dt_test = datetime(year=1985, month=10, day=25, hour=8, minute=18, - tzinfo=default_timezone()) - mock_dt.now.return_value = dt_test - self.assertEqual(now_local(), dt_test) - - expected_timezone = tzfile('/usr/share/zoneinfo/America/Chicago') - mock_dt.now.assert_called_with(expected_timezone) - - now_local(tzfile('/usr/share/zoneinfo/Europe/Stockholm')) - expected_timezone = tzfile('/usr/share/zoneinfo/Europe/Stockholm') - mock_dt.now.assert_called_with(expected_timezone) - - @mock.patch('mycroft.util.time.datetime') - def test_now_utc(self, mock_dt, mock_conf): - mock_conf.return_value = test_config - setup_locale() - - dt_test = datetime(year=1985, month=10, day=25, hour=8, minute=18) - mock_dt.utcnow.return_value = dt_test - - self.assertEqual(now_utc().tzinfo, gettz('UTC')) - - self.assertEqual(now_utc(), dt_test.astimezone(gettz('UTC'))) - mock_dt.utcnow.assert_called_with() - - def test_to_utc(self, mock_conf): - mock_conf.return_value = test_config - dt = datetime(year=2000, month=1, day=1, - hour=0, minute=0, second=0, - tzinfo=gettz('Europe/Stockholm')) - self.assertEqual(to_utc(dt), dt) - self.assertEqual(to_utc(dt).tzinfo, gettz('UTC')) - - def test_to_local(self, mock_conf): - mock_conf.return_value = test_config - dt = datetime(year=2000, month=1, day=1, - hour=0, minute=0, second=0, - tzinfo=gettz('Europe/Stockholm')) - self.assertEqual(to_local(dt), - dt.astimezone(default_timezone())) - self.assertEqual(to_local(dt).tzinfo, default_timezone()) - - def test_to_system(self, mock_conf): - mock_conf.return_value = test_config - dt = datetime(year=2000, month=1, day=1, - hour=0, minute=0, second=0, - tzinfo=gettz('Europe/Stockholm')) - self.assertEqual(to_system(dt), dt) - self.assertEqual(to_system(dt).tzinfo, tzlocal()) diff --git a/test/integrationtests/util/test_xdg.py b/test/integrationtests/util/test_xdg.py deleted file mode 100644 index 56fdd8267682..000000000000 --- a/test/integrationtests/util/test_xdg.py +++ /dev/null @@ -1,27 +0,0 @@ -from unittest import TestCase, mock - -from ovos_config.locations import get_xdg_config_save_path, get_xdg_data_save_path, get_xdg_cache_save_path -from ovos_backend_client.identity import IdentityManager -from mycroft.filesystem import FileSystemAccess -from mycroft.skills.settings import REMOTE_CACHE - - -class TestXdg(TestCase): - - @mock.patch('ovos_config.meta.get_xdg_base') - def test_base_folder(self, mock_folder): - mock_folder.return_value = "testcroft" - self.assertTrue(get_xdg_config_save_path().endswith("/testcroft")) - self.assertTrue(get_xdg_data_save_path().endswith("/testcroft")) - self.assertTrue(get_xdg_cache_save_path().endswith("/testcroft")) - - def test_identity(self): - self.assertTrue(IdentityManager.IDENTITY_FILE.startswith(get_xdg_config_save_path())) - self.assertTrue(IdentityManager.IDENTITY_FILE.endswith("/identity/identity2.json")) - self.assertTrue(IdentityManager.OLD_IDENTITY_FILE not in IdentityManager.IDENTITY_FILE) - - def test_filesystem(self): - self.assertTrue(FileSystemAccess("test").path.startswith(get_xdg_data_save_path())) - - def test_remote_config(self): - self.assertTrue(str(REMOTE_CACHE).startswith(get_xdg_cache_save_path())) diff --git a/test/integrationtests/util/unstripped_lines.txt b/test/integrationtests/util/unstripped_lines.txt deleted file mode 100644 index d8dee8ccdfea..000000000000 --- a/test/integrationtests/util/unstripped_lines.txt +++ /dev/null @@ -1,5 +0,0 @@ - Once upon a time -there was a great Dragon -It was red and cute - - The end diff --git a/test/unittests/test_skill_manager.py b/test/unittests/test_skill_manager.py index f5cf118d7986..70040ca6bc01 100644 --- a/test/unittests/test_skill_manager.py +++ b/test/unittests/test_skill_manager.py @@ -64,15 +64,13 @@ def mock_config(): @patch.dict(Configuration._Configuration__patch, mock_config()) class TestSkillManager(TestCase): - mock_package = 'mycroft.skills.skill_manager.' + mock_package = 'ovos_core.skill_manager.' def setUp(self): temp_dir = tempfile.mkdtemp() self.temp_dir = Path(temp_dir) self.message_bus_mock = MessageBusMock() self._mock_log() - self._mock_skill_updater() - self._mock_skill_settings_downloader() self.skill_manager = SkillManager(self.message_bus_mock) self._mock_skill_loader_instance() @@ -84,22 +82,6 @@ def _mock_log(self): def tearDown(self): rmtree(str(self.temp_dir)) - def _mock_skill_settings_downloader(self): - settings_download_patch = patch( - self.mock_package + 'SkillSettingsDownloader', - spec=True - ) - self.addCleanup(settings_download_patch.stop) - self.settings_download_mock = settings_download_patch.start() - - def _mock_skill_updater(self): - skill_updater_patch = patch( - self.mock_package + 'SkillUpdater', - spec=True - ) - self.addCleanup(skill_updater_patch.stop) - self.skill_updater_mock = skill_updater_patch.start() - def _mock_skill_loader_instance(self): self.skill_dir = self.temp_dir.joinpath('test_skill') self.skill_loader_mock = Mock(spec=SkillLoader) @@ -167,16 +149,6 @@ def test_deactivate_skill(self): self.skill_loader_mock.deactivate.assert_called_once() message.response.assert_called_once() - @patch("ovos_utils.log.LOG.exception") - def test_deactivate_skill_exception(self, mock_exception_logger): - message = Message("test.message", {'skill': 'test_skill'}) - message.response = Mock() - self.skill_loader_mock.deactivate.side_effect = Exception() - self.skill_manager.deactivate_skill(message) - self.skill_loader_mock.deactivate.assert_called_once() - message.response.assert_called_once() - mock_exception_logger.assert_called_once_with('Failed to deactivate test_skill') - def test_deactivate_except(self): message = Message("test.message", {'skill': 'test_skill'}) message.response = Mock() @@ -209,20 +181,3 @@ def test_activate_skill(self): self.skill_manager.activate_skill(message) test_skill_loader.activate.assert_called_once() message.response.assert_called_once() - - @patch("ovos_utils.log.LOG.exception") - def test_activate_skill_exception(self, mock_exception_logger): - message = Message("test.message", {'skill': 'test_skill'}) - message.response = Mock() - test_skill_loader = Mock(spec=SkillLoader) - test_skill_loader.activate.side_effect = Exception() - test_skill_loader.skill_id = 'test_skill' - test_skill_loader.active = False - - self.skill_manager.skill_loaders = {} - self.skill_manager.skill_loaders['test_skill'] = test_skill_loader - - self.skill_manager.activate_skill(message) - test_skill_loader.activate.assert_called_once() - message.response.assert_called_once() - mock_exception_logger.assert_called_once_with('Couldn\'t activate skill test_skill')