-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
40 lines (32 loc) · 787 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
package main
import (
"flag"
"log"
"os"
"github.com/mbndr/gopresskit"
)
func main() {
var (
inputPath = flag.String("input", ".", "Folder with the presskit data")
outputPath = flag.String("output", "./press", "Folder for the presskit html")
forceMode = flag.Bool("force", false, "Force existing output folder to remove")
classicStyle = flag.Bool("classic", false, "Use the classic style of dopresskit")
usage = flag.Bool("help", false, "Show command usage")
)
flag.Parse()
if *usage {
flag.PrintDefaults()
os.Exit(1)
}
p := presskit.Presskit{
InputPath: *inputPath,
OutputPath: *outputPath,
Parser: presskit.XMLParser{},
ForceMode: *forceMode,
ClassicStyle: *classicStyle,
}
err := p.Generate()
if err != nil {
log.Fatal(err)
}
}