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