Forgot to parse the cmd line!
This commit is contained in:
parent
514522950a
commit
b7e1cacbd9
1 changed files with 2 additions and 0 deletions
2
main.go
2
main.go
|
@ -47,9 +47,11 @@ var funmap = template.FuncMap{
|
||||||
const HTMLrocCredits = "Converted to HTML using <a href=\"https://git.fromouter.space/mcg/htmlroc\">htmlroc</a>"
|
const HTMLrocCredits = "Converted to HTML using <a href=\"https://git.fromouter.space/mcg/htmlroc\">htmlroc</a>"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
// Command line flags
|
||||||
txtfile := flag.String("in", "rules.txt", "Path to rules.txt file")
|
txtfile := flag.String("in", "rules.txt", "Path to rules.txt file")
|
||||||
tplfile := flag.String("template", "template.html", "Path to template file")
|
tplfile := flag.String("template", "template.html", "Path to template file")
|
||||||
outname := flag.String("out", "out.html", "Output file")
|
outname := flag.String("out", "out.html", "Output file")
|
||||||
|
flag.Parse()
|
||||||
|
|
||||||
// Read template file
|
// Read template file
|
||||||
tpl, err := template.New(*tplfile).Funcs(funmap).ParseFiles(*tplfile)
|
tpl, err := template.New(*tplfile).Funcs(funmap).ParseFiles(*tplfile)
|
||||||
|
|
Loading…
Reference in a new issue