This commit is contained in:
CDN 2025-04-23 08:01:13 +08:00
parent aedc4a4518
commit 9b0e2ed6dc
Signed by: CDN
GPG key ID: 0C656827F9F80080
15 changed files with 693 additions and 540 deletions

24
main.go
View file

@ -1,29 +1,9 @@
package main
import (
"fmt"
"os"
"sub-cli/cmd"
)
func main() {
// parse args
if len(os.Args) < 2 {
fmt.Println(USAGE)
return
}
switch os.Args[1] {
case "sync":
syncLyrics(os.Args[2:])
case "convert":
convert(os.Args[2:])
case "fmt":
fmtLyrics(os.Args[2:])
case "version":
fmt.Printf("sub-cli version %s\n", VERSION)
case "help":
fmt.Println(USAGE)
default:
fmt.Println("Unknown command")
fmt.Println(USAGE)
}
cmd.Execute()
}