-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add support for SubRip file format * Handle Windows newlines In Windows, a newline is represented as `\r\n`. * Add benchmark for regex vs time.Parse .srt detection * Make Srt timestamp detection more restrictive * Remove unused Srt functions * Use a constant for Srt timestamp layout * Remove redundant comments in Srt * make `Srt` work with Go <1.17 * Ensure correct Srt timestamp length before processing Co-authored-by: Gabriel Vasile <gabriel.vasile@email.com> * Remove `application/srt` alias from Srt Co-authored-by: Gabriel Vasile <gabriel.vasile@email.com>
- Loading branch information
1 parent
db2464c
commit e7d7726
Showing
8 changed files
with
177 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
1 | ||
00:02:16 --> 00:02:19 | ||
Senator, we're making | ||
our final approach into Coruscant. | ||
|
||
2 | ||
00:02:19 --> 00:02:21 | ||
Very good, Lieutenant. | ||
|
||
3 | ||
00:03:13 --> 00:03:15 | ||
We made it. | ||
|
||
4 | ||
00:03:18 --> 00:03:20 | ||
I guess I was wrong. | ||
|
||
5 | ||
00:03:20 --> 00:03:22 | ||
There was no danger at all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
1 | ||
00:02:16.612 --> 00:02:19.376 | ||
Senator, we're making | ||
our final approach into Coruscant. | ||
|
||
2 | ||
00:02:19.482 --> 00:02:21.609 | ||
Very good, Lieutenant. | ||
|
||
3 | ||
00:03:13.336 --> 00:03:15.167 | ||
We made it. | ||
|
||
4 | ||
00:03:18.608 --> 00:03:20.371 | ||
I guess I was wrong. | ||
|
||
5 | ||
00:03:20.476 --> 00:03:22.671 | ||
There was no danger at all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
1 | ||
00:02:16,612 --> 00:02:19,376 | ||
Senator, we're making | ||
our final approach into Coruscant. | ||
|
||
2 | ||
00:02:19,482 --> 00:02:21,609 | ||
Very good, Lieutenant. | ||
|
||
3 | ||
00:03:13,336 --> 00:03:15,167 | ||
We made it. | ||
|
||
4 | ||
00:03:18,608 --> 00:03:20,371 | ||
I guess I was wrong. | ||
|
||
5 | ||
00:03:20,476 --> 00:03:22,671 | ||
There was no danger at all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters