Napi-js
A Node.js library for downloading movie subtitles using the NapiProjekt API.
Usage
npm install napi-js
Next just do something like this:
var napijs = ; var options = ... ;napijs ;
Subtitles are saved under the same directory and name as the movie file.
Options
Commands
There are two available commands:
download
: download subtitles from Napirpojekt serverwatch
: watch directory for changes and if new file appears then download the subtitles
napijs download
Options:
Options: --version, -v Show version number [boolean] --help, -h Show help [boolean] -l, --language Set subtitles language. Available languages: POL, ENG [choices: "POL", "ENG"] [default: "POL"] --verbose Show output [default: false] -f, --files An array of files separated by space char. Glob expression allowed. For more information visit: https://github.com/isaacs/node-glob [array] [default: ["*.mkv","*.avi","*.mp4","*.mpeg","*.wmv","*.rmvb","*.mov","*.mpg"]] --file Path to single file. If provided then --files argument is ignored -s, --save Overwrite subtitles file
napijs watch
Options:
Options: --version, -v Show version number [boolean] --help, -h Show help [boolean] -l, --language Set subtitles language. Available languages: POL, ENG [choices: "POL", "ENG"] [default: "POL"] --verbose Show output [default: false] -f, --files An array of files separated by space char. Glob expression allowed. For more information visit: https://github.com/isaacs/node-glob [array] [default: ["*.mkv","*.avi","*.mp4","*.mpeg","*.wmv","*.rmvb","*.mov","*.mpg"]] --file Path to single file. If provided then --files argument is ignored -s, --save Overwrite subtitles file
Command line usage
It's also possible to use napijs
as a command line tool. To do so, install it as a global package. Example:
npm i napijs -g napijs -h napijs download -f "**.mkv" Search subtitles
Support
I strongly suggest to support Napiprojekt. They do a great job!
License
Copyright 2016 Marcin Kozaczyk MIT License (enclosed).