gulp-translation-tool-srt plugin for gulp
First, install gulp-translation-tool-srt
as a dependency:
npm install gulp-translation-tool-srt
Then, add it to your gulpfile.js
:
var gulpTranslationToolSRT = require("gulp-translation-tool-srt");
gulp.src('./data/*.srt')
.pipe(gulpTranslationToolSrt({
mode: 'toXML',
name: function (basename) {
return basename + '-done';
}
}))
.pipe(gulp.dest('./data/output/'));
Type: String
Default: toXML
Switch the direction of the conversion between toXML
and toSRT
.
Type: String|Function
Rename the filename of the output use string or return function.