-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
49 lines (40 loc) · 858 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
48
49
package main
import (
"os"
"github.com/tektsu/gedcom2hugo/cmd"
"github.com/urfave/cli"
)
const version = "0.0.0.1"
func main() {
cli.VersionFlag = cli.BoolFlag{
Name: "version, V",
Usage: "print only the version",
}
app := cli.NewApp()
app.Name = "gedcom2hugo"
app.Usage = "Generate Hugo input files from a GEDCOM file"
app.Version = version
app.Flags = []cli.Flag{
cli.BoolFlag{
Name: "verbose, v",
Usage: "Enable verbose output",
},
cli.BoolFlag{
Name: "debug, d",
Usage: "Enable debugging output",
},
cli.StringFlag{
Name: "gedcom, g",
Usage: "Specify the input GEDCOM file",
},
cli.StringFlag{
Name: "project, p",
Value: ".",
Usage: "Specify the top level directory of the Hugo project",
},
}
app.ArgsUsage = " "
app.HideHelp = true
app.Action = cmd.Generate
app.Run(os.Args)
}