24 lines
499 B
Go
24 lines
499 B
Go
package main
|
|
|
|
import (
|
|
"flag"
|
|
"io/ioutil"
|
|
|
|
"github.com/f0086/toolheim/exporter"
|
|
"github.com/f0086/toolheim/parser"
|
|
)
|
|
|
|
var warbandFile = flag.String("warband", "", ".mordheim warband definition file to work with")
|
|
var multiPage = flag.Bool("multipage", false, ".flag to generate multipage PDF")
|
|
|
|
func main() {
|
|
flag.Parse()
|
|
|
|
yamlContent, err := ioutil.ReadFile(*warbandFile)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
warband := parser.ParseWarband(yamlContent)
|
|
exporter.MakePDF(warband, *multiPage)
|
|
}
|