Code cleanup, adapting modules for new web-ui

This commit is contained in:
Ace
2020-11-10 22:48:04 +01:00
parent 035ce65f06
commit b1c06b3add
26 changed files with 426 additions and 570 deletions

View File

@@ -18,9 +18,9 @@ except ImportError:
filename = os.path.basename(__file__).split('.py')[0]
logger = logging.getLogger(filename)
logger.setLevel(level=logging.INFO)
logger.setLevel(level=logging.ERROR)
class RSS(inkycal_module):
class Feeds(inkycal_module):
"""RSS class
parses rss/atom feeds from given urls
"""
@@ -35,7 +35,7 @@ class RSS(inkycal_module):
}
optional = {
"shuffle_feeds": {
"label": "Should the parsed RSS feeds be shuffled? (default=True)",
"options": [True, False],
@@ -61,7 +61,7 @@ class RSS(inkycal_module):
# optional parameters
self.shuffle_feeds = bool(self.config["shuffle_feeds"])
# give an OK message
print('{0} loaded'.format(filename))
@@ -149,4 +149,4 @@ class RSS(inkycal_module):
return im_black, im_colour
if __name__ == '__main__':
print('running {0} in standalone/debug mode'.format(filename))
print('running {0} in standalone/debug mode'.format(filename))