Commit Graph

3113 Commits (faf29d1fefb70b2a92ee6552a36b35bac540bf3e)

Author SHA1 Message Date
Åke faf29d1fef
Merge pull request #2009 from MycroftAI/bugfix/voc-match
Fix behavior of MycroftSkills.voc_match()
2019-02-24 15:50:25 +01:00
Åke 3fb3dce476
Merge pull request #2013 from MycroftAI/krisgesling-typo
Fix typo: "excepected" > "expected"
2019-02-24 11:12:15 +01:00
Kris Gesling 6bfe8e26b0
Fix typo: "excepected" > "expected" 2019-02-24 17:04:14 +09:30
Åke Forslund 40eca55cf2 Expand .voc files in MycroftSkill.voc_match()
- Create a read_vocab_file() function that normal vocab loading and voc_match both uses. This function handles blank lines and comments
- Use a simpler regex instead of word logic to match
- Add a couple of test cases for the method
2019-02-22 18:49:01 +01:00
Åke b4fc3ab389
Merge pull request #2011 from MycroftAI/feature/logging-control
Improve debug logging
2019-02-22 17:37:32 +01:00
Åke Forslund 5ce4754d94 Cleanup of broken and incorrect code
- Fix pep8 in util/__init__
- Remove half done if statement and fix codacy in text_client.py
- CAPITALIZE the log levels
2019-02-22 14:54:28 +01:00
Åke Forslund ae577a7ad7 Also update the log level of urllib3 2019-02-22 14:34:10 +01:00
Åke Forslund 53b0f34220 Fix setting log level 2019-02-22 14:33:21 +01:00
Steve Penrod deb3721f13
Fix PEP8 issues 2019-02-22 05:16:38 -06:00
Steve Penrod fbcfe6c816 Improve debug logging
Several changes to the logging using in all processes:
* Disable logging of bus messages by default (massively cleans up the logs)
* Add "mycroft.debug.log" bus message.  It supports the data={"bus": True/False} as well as
  data={"log": LEVEL}, where level is a Python logging level.

CLI now supports several commands:
* ```:log level XXX``` where XXX is the name of a standard Python level (e.g. 'debug')
* ```:log bus on``` or ```:log bus off```
* Removed the requirement for "log" in ```:clear log```.  ```:clear``` works now.
2019-02-22 05:11:16 -06:00
Åke e221659122
Merge pull request #2010 from MycroftAI/bugfix/cli-mic-level-crash
Fix bug causing the mic-level meter to stop
2019-02-22 11:58:45 +01:00
Steve Penrod ed971ed1a9 Fix bug in the mic-level meter
The mic-level meter that appears in the Mycroft CLI could stop updating in
rare cases when a file I/O operation failed.  It would also fail to show
a meter ever if the mic_level file hadn't been created before the CLI was
started.
2019-02-22 11:54:00 +01:00
Steve Penrod eac364f0f8 Fix behavior of MycroftSkills.voc_match()
Previously the voc_match() method had several problems:
* Blank lines in the .voc file would cause it to match all strings
* Comments weren't ignored
* Substrings matched so "book" would match "ok", for instance
2019-02-22 04:25:57 -06:00
Åke d26650b143
Merge pull request #2004 from MycroftAI/feature/tweak-datetime-parse
Tweak English extract_datetime() parsing
2019-02-20 14:05:32 +01:00
Åke fae347dbaa
Merge pull request #2005 from MycroftAI/feature/mic-test-param
Support params for mycroft-mic-test
2019-02-20 10:59:37 +01:00
Åke Forslund d06207b07e Remove sleep after audiotest, not necessary any more 2019-02-20 09:54:15 +01:00
Steve Penrod 0c1bdfcc63 Support params for mycroft-mic-test
The audiotest utility supports parameters (e.g. -l), but the
mycroft-mic-test shortcut didn't allow parameters to be passed along.
2019-02-20 02:42:13 -06:00
Steve Penrod 631875d9c2 Tweak English extract_datetime() parsing
Ambiguous times previously used a generally unexpected rule about
when to jump 12 hours when parsing times.  Now it follows the rule:
If a time is spoken without am/pm indicator, assume the next time
that hasn't passed was intended.

For example:
  "at 7 o'clock"
Would mean 7:00am if spoken at 6:59am, but would mean 7:00pm
if spoken at 7:01am.
2019-02-20 01:56:20 -06:00
Åke 765a2830ef
Merge pull request #2001 from gras64/dev
German New day formaters update and join_list support for and/or
2019-02-19 08:39:27 +01:00
Åke Forslund 5614c5fb38 Add a couple of simple tests for german join_list 2019-02-19 08:08:23 +01:00
Andreas Reinle 13dcdd3b26 Add German date formatting and support for join_list and/or 2019-02-19 08:08:23 +01:00
Åke 7674fa1c65
Merge pull request #1995 from MycroftAI/feature/settings-cleanup
Clean up some exception handling in settings code
2019-02-18 09:11:01 +01:00
Åke ba24cc3d78 Feature/remove old viseme system (#2000)
* Remove the old single viseme message

Instead a single viseme message is sent

* Correct the spelling of viseme.

Ref: https://en.wikipedia.org/wiki/Viseme

* Remove debug print.

This was probably left in by mistake, removing to clean up the audio log somewhat.
2019-02-17 23:54:59 -06:00
Åke f1b4e48fcd
Merge pull request #1999 from MycroftAI/feature/unify-intent-dialog
Add (|) syntax to dialog files
2019-02-16 12:07:31 +01:00
Steve Penrod fb6bde0885 Fix rare settings bug
In the case where a network call during the initialization of the
settings poll fails the first time, it would never be tried again.
Now it will retry initialization once a minute.
2019-02-15 14:48:22 -06:00
Matthew D. Scholefield 64571924e7 Add (|) syntax to dialog and voc files 2019-02-15 12:05:39 -06:00
Kris Gesling 1d4f0811e2
Merge pull request #1997 from forslund/feature/mattermost-badge
Add mattermost badge to README.md
2019-02-15 20:11:49 +09:30
Ruthvicp d3015ca7e8 Pause at semicolon (#1989)
Split at semicolon and speak each chunk of data, similar to a period.
2019-02-15 02:54:42 -06:00
Åke 13194dd301
Merge pull request #1992 from MycroftAI/alistair23-alistair/utf8-encoding
Load .voc and .rx as utf-8
2019-02-15 09:02:14 +01:00
Åke 2b2f216d51
Merge pull request #1996 from forslund/feature/upgrade-msm
Restore "Upgrade msm to 0.7.2"
2019-02-15 09:01:52 +01:00
Åke Forslund 7668e5a078 Restore "Upgrade msm to 0.7.2"
This reverts commit a525a30cc6.
2019-02-15 06:51:58 +01:00
Steve Penrod 6b80d933ec Handle several other potential failure points
Several API calls weren't surrounded by any error handling.
2019-02-14 17:05:41 -06:00
Steve Penrod a76c3a6e7a Quiet PEP8 2019-02-14 15:49:05 -06:00
Steve Penrod de818db9cb Clean up some exception handling in settings code
The settings code worked, but was noisy and generally messy about
a few exceptional but common situations:
* When the .mycroft/skills/<SkillName> folder didn't already exist
* When network timeouts and such occcurred

I also slipped in a couple trivial code cleanups for an unused variable
and a log message.
2019-02-14 15:41:27 -06:00
devs-mycroft 040a78cb6b Version bump from 18.8.12 to 18.8.13 2019-02-14 12:07:24 +00:00
Åke d1299ea319
Merge pull request #1975 from forslund/feature/update-padaXXX
Update padatious and padaos
2019-02-14 09:49:36 +01:00
Åke 884bb56d9a
Merge pull request #1993 from MycroftAI/revert-1985-feature/upgrade-msm
Revert "Upgrade msm to 0.7.2"
2019-02-14 09:48:54 +01:00
Åke a525a30cc6
Revert "Upgrade msm to 0.7.2" 2019-02-14 09:47:31 +01:00
Åke f4769f859d
Merge pull request #1985 from MycroftAI/feature/upgrade-msm
Upgrade msm to 0.7.2
2019-02-13 22:49:42 +01:00
Matthew D. Scholefield 5aba9e96ff Upgrade msm to 0.7.2 2019-02-13 14:53:30 -06:00
Åke 1a9302418d
Merge pull request #1991 from MycroftAI/bigfix/hyper-critical-typo-fix
Correcting a typo
2019-02-13 21:08:34 +01:00
Åke Forslund 4a9aae4fea Load the settingsmeta as utf-8
the settings meta is also distributed by skills and should be considered to be utf-8 no matter the system settings.
2019-02-13 21:06:06 +01:00
Alistair Francis edafce059d skills: Open all skill data files as utf8 encoded
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> and Åke Forslund <ake.forslund@gmail.com>
2019-02-13 21:05:18 +01:00
Steve Penrod 22323827c5 Correcting a typo
This typo has been lingering waiting for an adjacent change.
I just want it out of my commit list.  :)
2019-02-13 12:22:27 -06:00
Åke 65a7197519
Merge pull request #1977 from ChristopherRogers1991/feature/issue-1959
Add extract_duration() method
2019-02-13 16:08:49 +01:00
Steve Penrod 065273bf4f New formatters: nice_duration() and join_list() (#1988)
* New formatters:  nice_duration() and join_list()

Adding two new formatting functions:
* nice_duration(duration, lang="en-us", speech=True)
  Accept seconds or duration and produce a nice sounding duration.
  Example:  nice_duration(61) == "one minute one second"
            nice_duration(61, speech=False) == "1:01"
* join_list(items, connector, sep=None, lang="en-us")
  Example:  join_list(["a", "b", "c"], "and") == "a, b and c"

This includes a translation helper that uses text files in the
mycroft/res/text/LANG/ directory, such as "second.word".
2019-02-13 12:52:35 +01:00
Chris Rogers 113352339d Fix pep8 issues.
This is in support of issues-1959.
2019-02-12 17:29:21 -05:00
Chris Rogers 4bca969316 Log unsupported languages.
This extracts the logging logic that was being used in a few places to
indicate certain parcing functions are not supported in particular
languages, and adds the logging to extract_duration.
2019-02-12 17:01:16 -05:00
Chris Rogers acbe46aede Fix documentation
Fix typo and add an explanation for
_extract_number_with_text_en_helper.
2019-02-12 16:36:11 -05:00
Chris Rogers cc0d3da62c Change _Token to a namedtuple.
This is in support of issues-1959.
2019-02-12 16:23:53 -05:00