konstrui/main.go
main.goRaw
1package main
2
3import (
4 "fmt"
5 "os"
6)
7
8const rawFolderPath = "./webInput"
9const newFolderPath = "./webOutput"
10const konstruiConfigFile = "konstruiConfig.json"
11
12func main() {
13 c.Green("getting files from /webInput")
14 c.Green("getting conifg from file konstruiConfig.json")
15
16 //READ CONFIG: konstruiConfig.json
17 readKonstruiConfig(rawFolderPath + "/" + konstruiConfigFile)
18 c.Green("configuration:")
19 fmt.Println(konstruiConfig)
20 c.Green("templating")
21
22 //create directory webOutput
23 _ = os.Mkdir("webOutput", os.ModePerm)
24
25 //DO TEMPLATING
26 startTemplating(rawFolderPath, newFolderPath)
27 c.Green("webpage finished, files at /webOutput")
28}