-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
47 lines (41 loc) · 789 Bytes
/
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
package main
import (
"github.com/codegangsta/cli"
)
func main() {
app := cli.NewApp()
app.Name = "Panorma"
app.Author = "Jais Cheema"
app.Version = "0.0.1"
app.Email = "[email protected]"
app.Usage = "panorma server"
configFlag := []cli.Flag{
cli.StringFlag{
Name: "config,c",
EnvVar: "CONFIG_PATH",
Value: "./config.json",
},
}
app.Commands = []cli.Command{
{
Name: "import",
ShortName: "i",
Description: "import pictures",
Action: ImportMedia,
Flags: configFlag,
},
{
Name: "server",
ShortName: "s",
Action: RunServer,
Flags: configFlag,
},
{
Name: "thumbnails",
ShortName: "t",
Action: ThumbnailImages,
Flags: configFlag,
},
}
app.RunAndExitOnError()
}