15 lines
278 B
Plaintext
15 lines
278 B
Plaintext
|
edit:add-var vtt2srt~ {|@argv|
|
|||
|
use re
|
|||
|
use str
|
|||
|
var cnv = {|vtt|
|
|||
|
if (not (re:match '.*\.vtt$' $vtt)) {
|
|||
|
echo $vtt 'n’est pas un fichier vtt'
|
|||
|
} else {
|
|||
|
var srt = (str:trim-suffix $vtt 'vtt')'srt'
|
|||
|
e:ffmpeg -i $vtt $srt
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
each $cnv $argv
|
|||
|
}
|