-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
89 lines (84 loc) · 1.75 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
package main
import (
"log"
"os"
"github.com/urfave/cli/v2"
"github.com/yasukotelin/adbeem/cmd"
)
func main() {
app := &cli.App{
Name: "adbeem",
Usage: "adbeem is a CLI tool using Android adb command more easily.",
Version: "1.6.1",
Commands: []*cli.Command{
{
Name: "screencap",
Aliases: []string{"screenshot"},
Usage: "capture the screen",
Action: cmd.Screencap,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "output",
Aliases: []string{"o"},
Usage: "output path",
},
},
},
{
Name: "screenrecord",
Usage: "records the screen",
Action: cmd.Screenrecord,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "output",
Aliases: []string{"o"},
Usage: "output path",
},
&cli.BoolFlag{
Name: "gif",
Aliases: []string{"g"},
Usage: "include converted gif",
},
&cli.StringFlag{
Name: "gif-quality",
Usage: "Gif quolity. middle or high.",
Value: "middle",
},
&cli.StringFlag{
Name: "gif-size",
Usage: "Gif size (pixel).",
Value: "320",
},
&cli.StringFlag{
Name: "gif-orientation",
Usage: "Gif orientation. portlait or landscape",
Value: "portlait",
},
&cli.StringFlag{
Name: "gif-fps",
Value: "20",
Usage: "Gif fps",
},
},
},
{
Name: "deeplink",
Usage: "send deeplink",
Action: cmd.DeepLink,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "url",
Aliases: []string{"u"},
Required: true,
Usage: "deep link url. (ex. \"example://app\")",
},
},
},
},
Action: cli.ShowAppHelp,
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}