Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 926 Bytes

README.md

File metadata and controls

47 lines (34 loc) · 926 Bytes

Napi-js

Node.js library for downloading movie subtitles using NapiProjekt API.

Usage

> npm install napi-js

Next just do something like that:

var napijs = require('../napi-js');

napijs.downloadSubtitles('MY_MOVIE.mkv', napijs.LANGUAGE.POLISH).then(function (obj) {
        console.log(obj);
    }, function (err) {
        console.error(err);
    },
    function (progress) {
        console.info(progress);
    }
);

Napi-js use promises.

Subtitles are save under this same name and directory as movie file but with .txt extension.

Using in command line

It's also possible to use napijs as a command line tool. To do so install it as a global package:

> npm i napijs -g

and then:

> napijs path/to/video/file

License

Copyright 2015 Marcin Kozaczyk MIT License (enclosed).