From 3cbf95d38b6f8bd17b4312371ed07e6847ff0f5c Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 21 May 2020 01:05:02 +0200 Subject: New option 'item-filter' --- pkg/config/config.go | 20 +++++++++++--------- pkg/config/deprecated.go | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'pkg') diff --git a/pkg/config/config.go b/pkg/config/config.go index 377365f..bd3927c 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -36,15 +36,16 @@ var DefaultGlobalOptions = GlobalOptions{ // Per feed options // NB: Always specify a yaml name, as it is later used in processing type Options struct { - MinFreq int `yaml:"min-frequency"` - InclImages bool `yaml:"include-images"` - EmbedImages bool `yaml:"embed-images"` - Disable bool `yaml:"disable"` - IgnHash bool `yaml:"ignore-hash"` - AlwaysNew bool `yaml:"always-new"` - Reupload bool `yaml:"reupload-if-updated"` - NoTLS bool `yaml:"tls-no-verify"` - Body Body `yaml:"body"` + MinFreq int `yaml:"min-frequency"` + InclImages bool `yaml:"include-images"` + EmbedImages bool `yaml:"embed-images"` + Disable bool `yaml:"disable"` + IgnHash bool `yaml:"ignore-hash"` + AlwaysNew bool `yaml:"always-new"` + Reupload bool `yaml:"reupload-if-updated"` + NoTLS bool `yaml:"tls-no-verify"` + ItemFilter string `yaml:"item-filter"` + Body Body `yaml:"body"` } // Default feed options @@ -57,6 +58,7 @@ var DefaultFeedOptions = Options{ AlwaysNew: false, Disable: false, NoTLS: false, + ItemFilter: "", } // Config holds the global configuration options and the configured feeds diff --git a/pkg/config/deprecated.go b/pkg/config/deprecated.go index c002085..9fb8b6e 100644 --- a/pkg/config/deprecated.go +++ b/pkg/config/deprecated.go @@ -20,7 +20,7 @@ var deprecatedOpts = map[string]deprecated{ "dumpdir": unsupported, "debug-updated": {"Use '-d' as option instead.", nil}, "execurl": unsupported, - "filter": unsupported, + "filter": {"Use 'item-filter' instead.", nil}, "disable-ssl-verification": {"Interpreted as 'tls-no-verify'.", func(i interface{}, global *GlobalOptions, opts *Options) { val, ok := i.(bool) if ok { -- cgit v1.2.3-70-g09d2