Snips action code for the Music app
Handles Snips dialogue output, converts structured date to some specific commands to control a target music player.
# Install the dependencies, builds the action and creates the config.ini file.
sh setup.shDon't forget to edit the config.ini file.
This project is based on mpd and a JavaScript library mpc.js.
An assistant containing the intents listed below must be installed on your system. Deploy it following these instructions.
- Dev mode:
# Dev mode watches for file changes and restarts the action.
npm run dev- Prod mode:
# 1) Lint, transpile and test.
npm start
# 2) Compile and run the action.
node action-music.jsThis app only supports french 🇫🇷 and english 🇬🇧.
In the src/index.ts file:
// Uncomment this line to print everything
// debug.enable(name + ':*')Requires mosquitto to be installed.
npm run testIn test mode, i18n output and http calls are mocked.
- http: mocks are written in
tests/httpMocks/index.ts - i18n: mocked by
snips-toolkit, see the documentation.
Please see the Contribution Guidelines.
This library is provided by Snips as Open Source software. See LICENSE for more information.