feat: version

This commit is contained in:
CDN18 2024-08-11 12:20:05 +08:00
parent 1b1862cb3f
commit 45e42ce4ff
Signed by: CDN
GPG key ID: 0C656827F9F80080
2 changed files with 15 additions and 10 deletions

View file

@ -18,6 +18,8 @@ func main() {
convertLyrics(os.Args[2:])
case "fmt":
fmtLyrics(os.Args[2:])
case "version":
fmt.Printf("lyc-cli version %s\n", VERSION)
case "help":
fmt.Println(USAGE)
default:

View file

@ -6,14 +6,17 @@ type Lyrics struct {
Content []string
}
const USAGE = `Usage: lyc-cli [command] [options]
Commands:
const (
VERSION = "0.2.0"
USAGE = `Usage: lyc-cli [command] [options]
Commands:
sync Synchronize timeline of two lyrics files
convert Convert lyrics file to another format
help Show help`
const SYNC_USAGE = `Usage: lyc-cli sync <source> <target>`
const CONVERT_USAGE = `Usage: lyc-cli convert <source> <target>
Note:
Target format is determined by file extension. Supported formats:
SYNC_USAGE = `Usage: lyc-cli sync <source> <target>`
CONVERT_USAGE = `Usage: lyc-cli convert <source> <target>
Note:
Target format is determined by file extension. Supported formats:
.txt Plain text format(No meta/timeline tags)`
)