Fix more indentations
This commit is contained in:
parent
9c6ff72a83
commit
9c641bb6d0
@ -206,14 +206,14 @@ class Core(CorePluginBase):
|
|||||||
return self.config['feeds'][feedname].get_config()
|
return self.config['feeds'][feedname].get_config()
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def get_filter_config(self, filtername):
|
def get_filter_config(self, filtername):
|
||||||
"""Returns a configuration for a filter"""
|
"""Returns a configuration for a filter"""
|
||||||
return self.config['filters'][filtername].get_config()
|
return self.config['filters'][filtername].get_config()
|
||||||
|
|
||||||
####################Information Getters####################
|
####################Information Getters####################
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def get_feeds(self):
|
def get_feeds(self):
|
||||||
"""Returns a list of the configured feeds"""
|
"""Returns a list of the configured feeds"""
|
||||||
feeds = []
|
feeds = []
|
||||||
for feedname in self.config['feeds']:
|
for feedname in self.config['feeds']:
|
||||||
@ -222,7 +222,7 @@ class Core(CorePluginBase):
|
|||||||
return feeds
|
return feeds
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def get_filters(self):
|
def get_filters(self):
|
||||||
"""Returns a list of all available filters"""
|
"""Returns a list of all available filters"""
|
||||||
filters = []
|
filters = []
|
||||||
for filter in self.config['filters']:
|
for filter in self.config['filters']:
|
||||||
@ -231,7 +231,7 @@ class Core(CorePluginBase):
|
|||||||
return filters
|
return filters
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def get_items(self, feedname):
|
def get_items(self, feedname):
|
||||||
"""Returns a dictionary with feedname:link"""
|
"""Returns a dictionary with feedname:link"""
|
||||||
try:
|
try:
|
||||||
items = {}
|
items = {}
|
||||||
@ -244,7 +244,7 @@ class Core(CorePluginBase):
|
|||||||
return items
|
return items
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def test_filter(self, regex):
|
def test_filter(self, regex):
|
||||||
filters = { "to_test":Filter() }
|
filters = { "to_test":Filter() }
|
||||||
conf = filters["to_test"].get_config()
|
conf = filters["to_test"].get_config()
|
||||||
conf["regex"] = regex
|
conf["regex"] = regex
|
||||||
@ -255,7 +255,7 @@ class Core(CorePluginBase):
|
|||||||
return hits
|
return hits
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def add_feed(self, config):
|
def add_feed(self, config):
|
||||||
"""adds/updates a feed and, for whatever reason, sets the default timeout"""
|
"""adds/updates a feed and, for whatever reason, sets the default timeout"""
|
||||||
|
|
||||||
# save the feedname and remove it from the config
|
# save the feedname and remove it from the config
|
||||||
@ -306,14 +306,14 @@ class Core(CorePluginBase):
|
|||||||
self.config.save()
|
self.config.save()
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def add_filter(self, name):
|
def add_filter(self, name):
|
||||||
"""Adds a new filter to the configuration"""
|
"""Adds a new filter to the configuration"""
|
||||||
if not self.config['filters'].has_key(name): # we don't want to add a filter that already exists
|
if not self.config['filters'].has_key(name): # we don't want to add a filter that already exists
|
||||||
self.config['filters'][name] = Filter()
|
self.config['filters'][name] = Filter()
|
||||||
self.config.save()
|
self.config.save()
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def set_filter_config(self, filtername, conf):
|
def set_filter_config(self, filtername, conf):
|
||||||
"""Changes the options for a filter"""
|
"""Changes the options for a filter"""
|
||||||
oldconf = self.config['filters'][filtername].get_config()
|
oldconf = self.config['filters'][filtername].get_config()
|
||||||
for item in conf:
|
for item in conf:
|
||||||
@ -325,7 +325,7 @@ class Core(CorePluginBase):
|
|||||||
self.run_filters(feed)
|
self.run_filters(feed)
|
||||||
|
|
||||||
@export
|
@export
|
||||||
def remove_filter(self, name):
|
def remove_filter(self, name):
|
||||||
"""Removes a filter"""
|
"""Removes a filter"""
|
||||||
if self.config['filters'].has_key(name): # Can't remove a filter that doesn't exists
|
if self.config['filters'].has_key(name): # Can't remove a filter that doesn't exists
|
||||||
del self.config['filters'][name]
|
del self.config['filters'][name]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user