X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=srt2vtt;h=a4cb576042aabd05915205eb495a5116608c1dd0;hb=3d5619c63693a196652e3b9e545995ec4919152c;hp=15c812f8ae52dd578636fb632c07d2359755bb57;hpb=f891b76cfc4362946650c298c02bc06d04cdad54;p=srt2vtt.git diff --git a/srt2vtt b/srt2vtt index 15c812f..a4cb576 100755 --- a/srt2vtt +++ b/srt2vtt @@ -1,4 +1,4 @@ -#!/usr/bin/guile --no-auto-compile +#!/usr/bin/guile -*- scheme -*- !# @@ -66,9 +66,10 @@ two values: the start time and the end time. Valid input looks like ((start end) (parse-time-span (read-line port))) ((lines) (let loop ((lines '())) (let ((line (read-line port))) - (if (and (string-null? line) - ;; A subtitle may be a blank line! - (not (null? lines))) + (if (or (eof-object? line) + (and (string-null? line) + ;; A subtitle may be a blank line! + (not (null? lines)))) lines (loop (cons line lines))))))) (make-subtitle id start end lines)))