diff --git a/fileOperations.go b/fileOperations.go index 2fff6c5..d2e0fe2 100755 --- a/fileOperations.go +++ b/fileOperations.go @@ -76,7 +76,7 @@ func writeFile(path string, newContent string) { check(err) color.Green(path + ":") - color.Blue(newContent) + //color.Blue(newContent) } /*func generatePageFromTemplateAndData(templateContent string, entry dataEntry) string { diff --git a/konstrui b/konstrui index 45a5218..9f99d50 100755 Binary files a/konstrui and b/konstrui differ diff --git a/templating.go b/templating.go index d7376bc..d8e02ed 100644 --- a/templating.go +++ b/templating.go @@ -1,8 +1,6 @@ package main import ( - "fmt" - "strconv" "strings" "github.com/Jeffail/gabs" @@ -15,7 +13,8 @@ func duplicateText(original string, count int) string { } return result } -func replaceEntryOLD(templateContent string, entry dataEntry, jsonData *gabs.Container, elemName string) string { + +/*func replaceEntryOLD(templateContent string, entry dataEntry, jsonData *gabs.Container, elemName string) string { //replace {{}} with data var keys []string for key, _ := range entry { @@ -36,7 +35,7 @@ func replaceEntryOLD(templateContent string, entry dataEntry, jsonData *gabs.Con } return templateContent -} +}*/ func replaceEntry(templateContent string, entry dataEntry, jsonData *gabs.Container, elemName string) string { //fmt.Println(jsonData) children, _ := jsonData.S().ChildrenMap() @@ -106,7 +105,7 @@ func konstruiRepeatElem(templateContent string, entry dataEntry, jsonData *gabs. children, _ := jsonData.S(elemName).Children() var replaced string for _, child := range children { - fmt.Println(child.Data().(string)) + //fmt.Println(child.Data().(string)) replacedElem := strings.Replace(f, "{{"+elemName+"}}", child.Data().(string), -1) replaced = replaced + replacedElem }