subtitle parser can match webvtt and srt formats

This commit is contained in:
Nitsud Yarg 2026-05-17 22:02:36 -07:00
parent 69b07f3383
commit 99a109b130

View File

@ -63,6 +63,10 @@ def main():
notes_lines.append('##### ' + lines[i].strip() + " `" + lines[i+1].strip() + "`" + "\n")
i+=2
continue
if re.fullmatch(r'(\d{2,}:)*\d{2,}:\d{2,}[,.]\d{3,}\s*-->\s*(\d{2,}:)*\d{2,}:\d{2,}[,.]\d{3,}' , lines[i].strip()):
notes_lines.append('##### ' " `" + lines[i].strip() + "`" + "\n")
i+=1
continue
if has_japanese(lines[i]):
print(lines[i])
result = analyze(lines[i],vocab)