Skip to content

snipsco/snips-action-music

Repository files navigation

snips-action-music

Snips action code for the Music app

Handles Snips dialogue output, converts structured date to some specific commands to control a target music player.

Build Status

Setup

# Install the dependencies, builds the action and creates the config.ini file.
sh setup.sh

Don'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.

Run

  • 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.js

Test & Demo cases

This app only supports french 🇫🇷 and english 🇬🇧.

Debug

In the src/index.ts file:

// Uncomment this line to print everything
// debug.enable(name + ':*')

Test

Requires mosquitto to be installed.

npm run test

In 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.

Contributing

Please see the Contribution Guidelines.

Copyright

This library is provided by Snips as Open Source software. See LICENSE for more information.

About

Snips action code for the Music app

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages