feat: support vtt in sync and fmt
This commit is contained in:
parent
a6284897c8
commit
2fa12dbcde
4 changed files with 122 additions and 1 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"sub-cli/internal/format/lrc"
|
||||
"sub-cli/internal/format/srt"
|
||||
"sub-cli/internal/format/vtt"
|
||||
)
|
||||
|
||||
// Format formats a subtitle file to ensure consistent formatting
|
||||
|
@ -18,6 +19,8 @@ func Format(filePath string) error {
|
|||
return lrc.Format(filePath)
|
||||
case "srt":
|
||||
return srt.Format(filePath)
|
||||
case "vtt":
|
||||
return vtt.Format(filePath)
|
||||
default:
|
||||
return fmt.Errorf("unsupported format for formatting: %s", ext)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue