From 83d175b7b069bc3bbc0d600c2fab4d082e04b521 Mon Sep 17 00:00:00 2001 From: Eddy Pedroni Date: Tue, 8 Apr 2025 17:01:55 +0200 Subject: Python implementation with better multi-entry page support --- utils.go | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 utils.go (limited to 'utils.go') diff --git a/utils.go b/utils.go deleted file mode 100644 index db36745..0000000 --- a/utils.go +++ /dev/null @@ -1,42 +0,0 @@ -package main - -import ( - "github.com/BurntSushi/toml" - "io/ioutil" - "os" - "strings" -) - -type config struct { - DocsRoot string - TemplateFile string - TargetDir string - CssFile string - BaseUrl string -} - -func readConfig(file string) (cfg config) { - _, err := toml.DecodeFile(file, &cfg) - if err != nil { - panic(err) - } - cfg.BaseUrl = strings.TrimSuffix(cfg.BaseUrl, "/") - return -} - -func nameify(raw string) (clean string) { - clean = strings.ReplaceAll(raw, "-", " ") - clean = strings.TrimSpace(clean) - clean = strings.Title(clean) - return -} - -func createTempDir(name string) (path string) { - path, err := ioutil.TempDir("", "godocs") - if err != nil { - panic(err) - } - defer os.RemoveAll(path) - - return -} -- cgit v1.2.3