mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-04-08 18:03:37 +00:00
implement info command
upd help mds
This commit is contained in:
@@ -46,9 +46,10 @@ type CLI struct {
|
||||
|
||||
Version VersionFlag `help:"Print x32-cli version information and quit" name:"version" short:"v"`
|
||||
|
||||
Completion kongcompletion.Completion `help:"Generate shell completion scripts." cmd:"" aliases:"c"`
|
||||
Completion kongcompletion.Completion `help:"Generate shell completion scripts." cmd:""`
|
||||
Info InfoCmd `help:"Print mixer information." cmd:""`
|
||||
Raw RawCmd `help:"Send raw OSC messages to the mixer." cmd:""`
|
||||
|
||||
Raw RawCmd `help:"Send raw OSC messages to the mixer." cmd:"" group:"Raw"`
|
||||
Main MainCmdGroup `help:"Control the Main L/R output" cmd:"" group:"Main"`
|
||||
Mainmono MainMonoCmdGroup `help:"Control the Main Mono output" cmd:"" group:"MainMono"`
|
||||
Matrix MatrixCmdGroup `help:"Control the matrix outputs." cmd:"" group:"Matrix"`
|
||||
|
||||
18
cmd/x32-cli/info.go
Normal file
18
cmd/x32-cli/info.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type InfoCmd struct {
|
||||
}
|
||||
|
||||
func (c *InfoCmd) Run(ctx *context) error {
|
||||
fmt.Fprintf(
|
||||
ctx.Out,
|
||||
"Host: %s | Name: %s | Model: %s | Firmware: %s\n",
|
||||
ctx.Client.Info.Host,
|
||||
ctx.Client.Info.Name,
|
||||
ctx.Client.Info.Model,
|
||||
ctx.Client.Info.Firmware,
|
||||
)
|
||||
return nil
|
||||
}
|
||||
@@ -46,9 +46,10 @@ type CLI struct {
|
||||
|
||||
Version VersionFlag `help:"Print xair-cli version information and quit" name:"version" short:"v"`
|
||||
|
||||
Completion kongcompletion.Completion `help:"Generate shell completion scripts." cmd:"" aliases:"c"`
|
||||
Completion kongcompletion.Completion `help:"Generate shell completion scripts." cmd:""`
|
||||
Info InfoCmd `help:"Print mixer information." cmd:""`
|
||||
Raw RawCmd `help:"Send raw OSC messages to the mixer." cmd:""`
|
||||
|
||||
Raw RawCmd `help:"Send raw OSC messages to the mixer." cmd:"" group:"Raw"`
|
||||
Main MainCmdGroup `help:"Control the Main L/R output" cmd:"" group:"Main"`
|
||||
Strip StripCmdGroup `help:"Control the strips." cmd:"" group:"Strip"`
|
||||
Bus BusCmdGroup `help:"Control the buses." cmd:"" group:"Bus"`
|
||||
|
||||
18
cmd/xair-cli/info.go
Normal file
18
cmd/xair-cli/info.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
type InfoCmd struct {
|
||||
}
|
||||
|
||||
func (c *InfoCmd) Run(ctx *context) error {
|
||||
fmt.Fprintf(
|
||||
ctx.Out,
|
||||
"Host: %s | Name: %s | Model: %s | Firmware: %s\n",
|
||||
ctx.Client.Info.Host,
|
||||
ctx.Client.Info.Name,
|
||||
ctx.Client.Info.Model,
|
||||
ctx.Client.Info.Firmware,
|
||||
)
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user