Commit Graph

22 Commits (mark-ii/latest-sj201r5)

Author SHA1 Message Date
Åke fd12c88da5
Refactor/shellcheck bin (#3019)
* Shellcheck and update mycroft-config

* Shellcheck and update mycroft-pip

* Shellcheck and update mycroft-cli-client

* Shellcheck and update mycroft-help

* Shellcheck and update mycroft-listen

* Shellcheck and update mycroft-mic-test

* Shellcheck and update mycroft-msk

* Shellcheck and update mycroft-msm

* Shellcheck and update mycroft-say-to

* Shellcheck and update mycroft-skill-testrunner

* Shellcheck and update mycroft-speak

* Shellcheck and update mycroft-start

* Shellcheck and update mycroft-stop

* Add shellcheck step to github actions

This runs most of the shellcheck tests. The excludes are:
- SC1091: Avoids errors when shellcheck can't find sourced file
- SC2034: Unused variables, for example colors that aren't used yet
- SC2012: use of ls, from what I can see in our case this is fine (wc -l)

The version is locked to latest master as of November 2 2021
2021-11-04 17:01:17 +09:30
Gaëtan Trellu aa067419b0 [mycroft-config] Fix missing $... 2021-10-25 14:20:25 -04:00
Gaëtan Trellu 782c174668 [mycroft-config] Fix issue #2991 2021-10-23 21:43:06 -04:00
Åke Forslund 3fd96cf71b WIP Review comments
- Add TODO for 22.02 to remove the compatibility code
- Make Warning a single Log statement
- mycroft-config script now uses XDG-environment variable
- Remove redundant code
- Replace hard coded references to ~/.config
- Explicitly remove new path before move of "filesystem" (if needed)
2021-08-05 10:04:45 +02:00
Bart Ribbers e20443b824 Use XDG Base directories for settings, cache and runtime data
Improve deprecation warning message
2021-08-05 10:04:45 +02:00
Kris Gesling 394160885d consistent capitalization 2020-06-15 13:43:36 +09:30
Kris Gesling d561711890 update more info link to docs 2020-06-08 10:38:19 +09:30
Kris Gesling 23086d4f5c create Skill Dev commands section 2020-06-08 10:22:23 +09:30
Kris Gesling 41823ceeb6 add missing commands 2020-06-08 10:21:47 +09:30
Kris Gesling 975cf2d18b add config.json files to vk clearing 2020-05-21 11:42:03 +09:30
Kris Gesling 50073cfc51 add vktest clear command 2020-05-20 22:30:56 +09:30
Kris Gesling 1a96f04020 Add single Voight Kampff module interface
Takes in arguments for both test_setup.py and behave test runner. Parses
any args for test_setup and passes any remaining arguments to behave.

This moves argparsing out of the test_setup main() allowing the helper commands
to pass in pre-parsed arguments rather than adding logic inside main to
differentiate between a list and a preparsed arument object
2020-03-25 07:40:01 +01:00
FruityWelsh 389c7dcc8d
Added a cl tool to start mycroft to listen: mycroft-listen (#2460)
Add a cl tool to start mycroft to listen: mycroft-listen

Alternative triggers. #1357 - Added feature to activate via command line
This can be triggered in most desktop enviroments via short cuts


====  Documentation Notes ====
Activates the mycroft listening feature.

 On branch feature/mycroft-listen_cli_tool
 Changes to be committed:
	new file:   mycroft-listen
2020-02-04 09:12:38 +01:00
Åke Forslund fea313355c Warn of opening in view mode 2019-09-10 12:11:18 +02:00
Steve Penrod 98040e7be0 Support sensible-editor
Many versions of Linux (most Debian-based versions) support a mechanimsm
based on a link called "sensible-editor", which is configured to invoke
the user's preferred editing tool.

To get colorization help, the temp file is now named with a ".json"
extension.  Most editors can colorize appropriately based on that.
2019-09-10 12:11:18 +02:00
Steve Penrod f6587b3cbf Add mycroft-config tool to manage config files
The new mycroft-config utility simplifies management of the the
various configuration files that control Mycroft.  Commands include:
edit, show, get, set, reload.

* mycroft-config edit (default|remote|system|user)
Open the requested file in an editor (nano by default), performing
JSON validation warnings to minimize accidental edit errors.

* mycroft-config show (default|remote|system|user)
Dump the selected file with nice highlighting using jq

* mycroft-config get <var>
Load the mycroft.conf stack, outputting the effective value(s).  The
<var> is specified using jq-style specifiers.  For example:
   mycroft-config get enclosure.platform
   mycroft-config get location
   mycroft-config get

* mycroft-config set <var> <value>
Set the given variable in the "user" configuration file.  Examples:
   mycroft-config set lang "es-es"
   mycroft-config set tts.mimic.voice "ap"

* mycroft-config reload
Sends a signal on the messagebus to tell services to reload configs.
This automatically occurs after a 'set' or 'edit' command.
2019-09-10 12:11:18 +02:00
FruityWelsh f90e3fbfc7 Speak sayto bash pipes (#2111)
- Change mycroft-speak & mycroft-say-to to accept bash pipes
- add feature to allow all args to read into message
2019-05-13 08:29:50 +02: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 dd697cb765 Tweaks to start/stop scripts
Several minor changes:
* Add mycroft-start and mycroft-stop, which can be used as commands anywhere
  if the user has added this to the PATH.  They are shortcuts to the
  start-mycroft.sh and stop-mycroft.sh scripts.
* Add to the mycroft-help command reference
* Add "reset" parameter for start-mycroft.sh, which forces a service restart.
  If a service is currently running, it will not restart by default anymore.
* Make the 'enclosure' service part of 'all' regardless of platform.  This
  makes sense not that it can handle a remote GUI connection.
* BUG: mycroft-stop would sometimes show odd messages if the skill process
  had active child processes.
2019-01-15 09:08:13 +01:00
Steve Penrod 3c616307c2 Switch say/speak-to helper script names
The new mycroft-say-to and mycroft-speak scripts were swapped.  Whoops!
2018-09-09 23:50:38 -05:00
Steve Penrod 5e6c1773e4
Unify the command line experience across platforms (#1784)
* Unify the command line experience across platforms

Interacting with Mycroft was slightly different on different platforms
(Mark 1, Github, Picroft), which resulted in confusion and the beginnings of a
documentation/support nightmare.  This moves several of the common commands
into a mycroft-core/bin folder instead of being build in packaging or part
of the Picroft package only.

This required a small changes to the common scripts, in addition to adding
the new scripts.  Here are details:
* dev_setup.sh
  - Stubbed out a setup wizard (TODO)
  - Jumped to latest version of pip (18.0)
  - Set execution flags for new scripts
* start-mycroft.sh
  - Allow auto-execution of dev_setup.sh
  - De-sourced the stop-mycroft.sh calls (not needed)
  - Add quotes to better handle paths with spaces
* stop-mycroft.sh
  - Return exit code to show if a service was stopped or killed
  - Extend the time to wait for a gently shutdown from 2 secs to 5
  - Changed to say "messagebus.service" instead of just "service" to be more clear (the name "service" means nothing to users, but "bus does")
* venv-activate.sh
  - Added help
  - Added -q or --quiet mode
  - Added toggled availability of 'mycroft-venv-activate' and 'mycroft-venv-deactivate' aliases.  Only one is available at any given time.

New scripts:
* mycroft-cli-client: start up the CLI
* mycroft-help: shows hints on using mycroft
* mycroft-mic-test: runs the basic record/playback, playing nicely with a running Mycroft by stopping and restarting services as appropriate
* mycroft-pip: manage the venv via pip
* mycroft-say-to: send utterances, like a user spoke them
* mycroft-speak:  speaks the given phrase using Mycroft
* mycroft-skill-testrunner: invoke the single-skill test runner

All of these scripts are easy to discover by typing "mycroft-" then
hitting the TAB key.

==== INSTALLER NOTES ====
* We no longer need to create mycroft-cli-client and mycroft-pip in the Debian packages.
* mycroft-core/bin should be added to the path

* Corrections after review

Several minor corrections, plus added wrappers for the 'msm' and 'msk'
utilities.

* Set executable flag on script files in bin/

The scripts in the bin/ folder needed to be changed to executable within
git to prevent looking dirty after dev_setup.sh has been run.

* Add executable flag to one more script
2018-09-09 16:55:01 -05:00