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,18 +6,23 @@ const Version = "0.4.0"
// Usage stores the general usage information
const Usage = `Usage: sub-cli [command] [options]
Commands:
sync Synchronize timeline of two lyrics files
convert Convert lyrics file to another format
fmt Format lyrics file
sync Synchronize timeline of two subtitle files
convert Convert subtitle file to another format
fmt Format subtitle file
help Show help`
// SyncUsage stores the usage information for the sync command
const SyncUsage = `Usage: sub-cli sync <source> <target>`
const SyncUsage = `Usage: sub-cli sync <source> <target>
Note:
Currently supports synchronizing between files of the same format:
- LRC to LRC
- SRT to SRT
If source and target have different numbers of entries, a warning will be shown.`
// ConvertUsage stores the usage information for the convert command
const ConvertUsage = `Usage: sub-cli convert <source> <target>
Note:
Target format is determined by file extension. Supported formats:
.txt Plain text format(No meta/timeline tags, only support as target format)
.txt Plain text format (No meta/timeline tags, only support as target format)
.srt SubRip Subtitle format
.lrc LRC format`