fix #71 and #73: add support for outdir template and enhance docs

This commit is contained in:
2024-02-10 14:36:53 +01:00
parent e838f71781
commit b464a1bfaa
6 changed files with 279 additions and 4 deletions

View File

@@ -52,6 +52,8 @@ const (
DefaultAdNameTemplate string = "{{.Slug}}"
DefaultOutdirTemplate string = "."
// for image download throttling
MinThrottle int = 2
MaxThrottle int = 20
@@ -128,7 +130,7 @@ func InitConfig(output io.Writer) (*Config, error) {
// Load default values using the confmap provider.
if err := kloader.Load(confmap.Provider(map[string]interface{}{
"template": template,
"outdir": ".",
"outdir": DefaultOutdirTemplate,
"loglevel": "notice",
"userid": 0,
"adnametemplate": DefaultAdNameTemplate,