Skip to content
A simple Node module to allow using TxtToSL's API to translate text into sign languages.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
index.js
package.json
test.js

README.md

txttosl-api-node

npm package

License: MIT

A simple Node module to allow using TxtToSL's API to translate text into sign languages.

const txttosl = require('txttosl-api');

txttosl.translate('Hello world!', 'BSL').then((url) => {
  console.log(url);
  // example output: https://v.txttosl.com/yirCaRNq.gif
});

More options are avaliable with the third argument:

const txttosl = require('txttosl-api');

txttosl.translate('Hello world!', 'BSL', {hoster: 'imgur'}).then((url) => {
  console.log(url);
  // example output: https://i.imgur.com/1kzUhOJ.gif
});

const txttosl = require('txttosl-api');

txttosl.translate('Hello world!', 'BSL', {overlay: false}).then((url) => {
  console.log(url);
  // example output: https://v.txttosl.com/BkakvkDo.gif
});

Progress callback / feedback is avaliable in the fourth and fifth arguments:

const txttosl = require('txttosl-api');
const progressCallback = (msg) => { console.log(`callback: ${msg}`); };

txttosl.translate('Hello world!', 'BSL', {}, progressCallback, 'my-project-identifier')
.then((url) => {
  console.log(`url: ${url}`);
});

/* example output:
  callback: Importing library 'yaspin'...
  ...etc...
  callback: Uploading...
  callback: Uploaded to: https://v.txttosl.com/fvzPhJim.gif
  url: https://v.txttosl.com/fvzPhJim.gif
*/
You can’t perform that action at this time.