mirror of
https://codeberg.org/scip/kleingebaeck.git
synced 2025-12-16 12:01:00 +01:00
Fix/timeformat (#122)
* Fix #121: confused day with month thanks to time.Format * Add outdir template variable example
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2023-2024 Thomas von Dein
|
Copyright © 2023-2025 Thomas von Dein
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -34,7 +34,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
VERSION string = "0.3.16"
|
VERSION string = "0.3.17"
|
||||||
Baseuri string = "https://www.kleinanzeigen.de"
|
Baseuri string = "https://www.kleinanzeigen.de"
|
||||||
Listuri string = "/s-bestandsliste.html"
|
Listuri string = "/s-bestandsliste.html"
|
||||||
Defaultdir string = "."
|
Defaultdir string = "."
|
||||||
|
|||||||
@@ -12,8 +12,10 @@ user = 00000000
|
|||||||
loglevel = "verbose"
|
loglevel = "verbose"
|
||||||
|
|
||||||
# directory where to store downloaded ads. kleingebaeck will try to
|
# directory where to store downloaded ads. kleingebaeck will try to
|
||||||
# create it. must be a quoted string.
|
# create it. must be a quoted string. You can also include a couple of
|
||||||
outdir = "test"
|
# template variables, e.g:
|
||||||
|
# outdir = "test-{{.Year}}-{{.Month}}-{{.Day}}"
|
||||||
|
outdir = "test"
|
||||||
|
|
||||||
# template for stored adlistings.
|
# template for stored adlistings.
|
||||||
template="""
|
template="""
|
||||||
|
|||||||
6
store.go
6
store.go
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2023-2024 Thomas von Dein
|
Copyright © 2023-2025 Thomas von Dein
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -44,8 +44,8 @@ func OutDirName(conf *Config) (string, error) {
|
|||||||
now := time.Now()
|
now := time.Now()
|
||||||
data := OutdirData{
|
data := OutdirData{
|
||||||
Year: now.Format("2006"),
|
Year: now.Format("2006"),
|
||||||
Month: now.Format("02"),
|
Month: now.Format("01"),
|
||||||
Day: now.Format("01"),
|
Day: now.Format("02"),
|
||||||
}
|
}
|
||||||
|
|
||||||
err = tmpl.Execute(&buf, data)
|
err = tmpl.Execute(&buf, data)
|
||||||
|
|||||||
Reference in New Issue
Block a user