elvish_config/aliases/ffmpeg.elv

15 lines
278 B
Plaintext
Raw Permalink Normal View History

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