This is a step towards abstracting the idea of an Enclosure which ties Mycroft to the hardware that is running Mycroft.
- Move the enclosure API to mycroft.enclosure.api (previously was mycroft.client.enclosure.api)
- Move display_manager out of enclosure client to mycroft.enclosure.display_manager
- Merge EnclosureWeather into EnclosureMouth
- Wrap display manager in a class
* Add MycroftSkill.find_resource() that locates a localization resource file
from either under the old vocab/regex/dialog folder, or under any folder in
the new 'locale' folder. The locale folder unifies the three different
folders and allows arbitrary subfolders underneath it.
* MycroftSkill.speak_dialog() will now speak the entry name if no dialog file
is found. Periods are replaced with spaces, so
```self.speak_dialog("this.is.a.test.")``` would return "this is a test" if
no file named this.is.a.test.dialog is found.
* Remove MycroftSkills.vocab_dir value
* Minor edits to several docstrings
The method first tries to use the skill vocab directory and then tries
the mycroft/res/text... directory.
After the vocab is loaded from file once it's stored in a cache
dictionary and further uses of the method won't hit the disk.
Example:
if self.voc_match(utt, "Yes):
...
Skills list shared the help screen id it was immediately overwritten by
the help.
- Give the skills page a separate page number
- Replace screen id numbers with simple identifiers
- Add simple handling of multiple pages
The initial implementation of web settings returned values as
strings all the time, even Boolean and numeric values. This
required unnecessarily complicated code, such as:
```python
if setting["show_time"] == "true":
# do whatever...
```
Now a value defined in metadata as a "checkbox" gets cast to a boolean,
and values defined in metadata as a "number" is typecast to int or
float, as appropriate. This allows cleaner code such as:
```python
if setting["show_time"]:
# do whatever...
```
NOTE: This can be a breaking change, verify you skill which uses 'checkbox'
webUI types handles this correctly for 18.08.
Several visual changes to the logs (no functional difference)
* Added 'with' to close test_case_file, quieting warning
* Highlight Mycroft's utterannces in output and moved print to fix order of printing
* Better highlight sending a response
* Highlight the test utterance
The API.find/find_setting/find_location() methods were replaced by
API.get/get_setting/get_location() some time ago. Permanently removing
the deprecated functions.
The list holding the names of scheduled events was being populated with decorated names,
but other code assumed it held the "friendly" name. Corrected this assumption.
Several locations also removed list entries while iterating on the same list, resulting
in entries being skipped and left un-deleted. This left behind phantom scheduled events
when skills were reloaded, goofing up many schedules after the reload.