aboutsummaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-21 01:05:02 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-05-21 01:08:48 +0200
commit3cbf95d38b6f8bd17b4312371ed07e6847ff0f5c (patch)
treea4cf921931dd84dcda7a73fc37a4ff7b1a1ffa18 /pkg
parent2a8e0cf3750d3f789bcd756e39af04f00fe0e738 (diff)
downloadfeed2imap-go-3cbf95d38b6f8bd17b4312371ed07e6847ff0f5c.tar.gz
feed2imap-go-3cbf95d38b6f8bd17b4312371ed07e6847ff0f5c.tar.bz2
feed2imap-go-3cbf95d38b6f8bd17b4312371ed07e6847ff0f5c.zip
New option 'item-filter'
Diffstat (limited to 'pkg')
-rw-r--r--pkg/config/config.go20
-rw-r--r--pkg/config/deprecated.go2
2 files changed, 12 insertions, 10 deletions
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 {