Add year,month,day support to Adnametemplate (#123)

* add year, month and day to adnametemplate as well
This commit is contained in:
T.v.Dein
2025-02-27 17:58:05 +01:00
committed by GitHub
parent eff0af0b34
commit 4030d04b06
6 changed files with 71 additions and 8 deletions

5
ad.go
View File

@@ -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
it under the terms of the GNU General Public License as published by
@@ -45,6 +45,9 @@ type Ad struct {
Text string `goquery:"p#viewad-description-text,html"`
Images []string `goquery:".galleryimage-element img,[src]"`
Expire string
// runtime computed
Year, Day, Month string
}
// Used by slog to pretty print an ad