sgraham785 / webtask-slack-translate

Webtask.io Slack Translator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webtask.io Slack Translator

This Slack command script is deployable to Webtask.io. Uses Google Translate for translation

Getting Started

First you will need to have accounts for Webtask.io, Google Translate, and a Slack Domain

Prerequisites

  1. Install Webtask CLI
  2. Google API Key
  3. Register the Slack App
  4. Add the Slack Token to .env see .env.sample for available KEY=VALUES

Create your Webtask for first time

wt create dist/translate.js \
--name slack-translate \
--secret-file .env \
--dependency axios@0.16.2

Deployment

npm run deploy

Usage

Once everything is set up in a public Slack channel, use the tool like so...

> /translate Hello World -- es
> Hola Mundo

Tests

npm test

Contributing

  1. Create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am 'Add some feature'
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull/merge request to a maintainer :D

Authors

License

MIT licensed.

About

Webtask.io Slack Translator

License:MIT License


Languages

Language:JavaScript 100.0%