feat: version
This commit is contained in:
parent
1b1862cb3f
commit
45e42ce4ff
2 changed files with 15 additions and 10 deletions
2
main.go
2
main.go
|
@ -18,6 +18,8 @@ func main() {
|
||||||
convertLyrics(os.Args[2:])
|
convertLyrics(os.Args[2:])
|
||||||
case "fmt":
|
case "fmt":
|
||||||
fmtLyrics(os.Args[2:])
|
fmtLyrics(os.Args[2:])
|
||||||
|
case "version":
|
||||||
|
fmt.Printf("lyc-cli version %s\n", VERSION)
|
||||||
case "help":
|
case "help":
|
||||||
fmt.Println(USAGE)
|
fmt.Println(USAGE)
|
||||||
default:
|
default:
|
||||||
|
|
9
model.go
9
model.go
|
@ -6,14 +6,17 @@ type Lyrics struct {
|
||||||
Content []string
|
Content []string
|
||||||
}
|
}
|
||||||
|
|
||||||
const USAGE = `Usage: lyc-cli [command] [options]
|
const (
|
||||||
|
VERSION = "0.2.0"
|
||||||
|
USAGE = `Usage: lyc-cli [command] [options]
|
||||||
Commands:
|
Commands:
|
||||||
sync Synchronize timeline of two lyrics files
|
sync Synchronize timeline of two lyrics files
|
||||||
convert Convert lyrics file to another format
|
convert Convert lyrics file to another format
|
||||||
help Show help`
|
help Show help`
|
||||||
|
|
||||||
const SYNC_USAGE = `Usage: lyc-cli sync <source> <target>`
|
SYNC_USAGE = `Usage: lyc-cli sync <source> <target>`
|
||||||
const CONVERT_USAGE = `Usage: lyc-cli convert <source> <target>
|
CONVERT_USAGE = `Usage: lyc-cli convert <source> <target>
|
||||||
Note:
|
Note:
|
||||||
Target format is determined by file extension. Supported formats:
|
Target format is determined by file extension. Supported formats:
|
||||||
.txt Plain text format(No meta/timeline tags)`
|
.txt Plain text format(No meta/timeline tags)`
|
||||||
|
)
|
||||||
|
|
Reference in a new issue