new from to subtitle sync format
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 29 Oct 2009 19:07:27 +0000 (20:07 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 29 Oct 2009 19:07:27 +0000 (20:07 +0100)
bin/sync2yaml.pl

index bb0e393..d68ae00 100755 (executable)
@@ -17,6 +17,8 @@ while(<>) {
                my $t = $1 * 60 + $2;
                $nr++;
                push @subtitles, [ $t, $t+3, "[$nr] $3" ];
+       } elsif ( m{(\d+\.\d+)\s+(\d+\.\d+)\s+(.+)} ) {
+               push @subtitles, [ $1, $2, "[$nr] $3" ];
        } else {
                die "unknown format: $_";
        }