feat: srt sync and formatting

This commit is contained in:
CDN 2025-04-23 10:27:59 +08:00
parent 6bb9f06c52
commit ba2e477dc0
Signed by: CDN
GPG key ID: 0C656827F9F80080
4 changed files with 181 additions and 12 deletions

View file

@ -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)
}