Snips action code for the Unit Conversion app
sh setup.sh
Don't forget to edit the config.ini
file.
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) Run the action.
node action-unit-converter.js
This app only supports french 🇫🇷 and english 🇬🇧.
Convert a specific amount to the destination unit
Hey Snips, convert 6 kilometers in miles, please
Give the conversion between a unit and another
Hey Snips, one gallon is how many liters?
In the action-unit-converter.js
file:
// Uncomment this line to print everything
// debug.enable(name + ':*')
Requires mosquitto to be installed.
npm start
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.
Please see the Contribution Guidelines.
This library is provided by Snips as Open Source software. See LICENSE for more information.