Command-line app for downloading subtitles
$ npm install -g subfil
$ subfil "spiderman.avi" --language pt
subfil
uses the SubDB API to download subtitles. All API calls require a unique hash of the video for which subtitles are required. Refer to the
API Documentation to see how the hash is generated.
$ npm install --save subfil
// List available languages for hash
subfil.getLanguages(hash, callback);
A filename
can also be provided instead of the hash. The callback gets two arguments (err, languages)
where languages
is an array of the available languages.
// Download subtitles for hash
subfil.download(hash[, language[, destination]], callback);
A filename
can also be provided instead of the hash. The callback gets two arguments (err, destination)
where destination is the filename to which the subtitles are downloaded. language
defaults to en
and destination
defaults to a file in tmp
directory for hash and an srt
file in the same folder for a filename.
MIT © Divij Bindlish