Formater des vtt pour en faire des lignes plus ou moins longues - retour accueil
git clone git://bebou.netlib.re/fmtvtt
Log | Files | Refs |
fmtvtt.sh (420B)
1 awk ' 2 function addnextline() { 3 getline;getline 4 end=$3 5 getline 6 line=line" "$0 7 } 8 /^[0-9]+$/ { n=$0; next } 9 /^[0-9:.]+ --> [0-9:.]+$/ { start=$1; end=$3; next } 10 /^WEBVTT$/ { print; next } 11 /^$/ { next } 12 { 13 line=$0;l=length(line) 14 while(l<60) { addnextline(); l=length(line) } 15 print n 16 print start" --> "end 17 print line 18 } 19 '