fix plugins
This commit is contained in:
parent
3b5e66af40
commit
5c29dfed8d
|
@ -39,6 +39,7 @@ from feed2toot.lock import LockFile
|
||||||
from feed2toot.message import build_message
|
from feed2toot.message import build_message
|
||||||
from feed2toot.message import send_message_dry_run
|
from feed2toot.message import send_message_dry_run
|
||||||
from feed2toot.message import send_message
|
from feed2toot.message import send_message
|
||||||
|
from feed2toot.plugins import activate_plugins
|
||||||
from feed2toot.removeduplicates import RemoveDuplicates
|
from feed2toot.removeduplicates import RemoveDuplicates
|
||||||
from feed2toot.rss import populate_rss
|
from feed2toot.rss import populate_rss
|
||||||
from feed2toot.sortentries import sort_entries
|
from feed2toot.sortentries import sort_entries
|
||||||
|
@ -116,13 +117,13 @@ class Main:
|
||||||
entrytosend = fe.finalentry
|
entrytosend = fe.finalentry
|
||||||
if entrytosend:
|
if entrytosend:
|
||||||
finaltweet = build_message(entrytosend, tweetformat, rss)
|
finaltweet = build_message(entrytosend, tweetformat, rss)
|
||||||
if clioptions.dryrun:
|
if clioptions.dryrun:
|
||||||
send_message_dry_run(config, entrytosend, finaltweet)
|
send_message_dry_run(config, entrytosend, finaltweet)
|
||||||
else:
|
else:
|
||||||
send_message(config, clioptions, options, entrytosend, finaltweet, cache, rss)
|
send_message(config, clioptions, options, entrytosend, finaltweet, cache, rss)
|
||||||
# plugins
|
# plugins
|
||||||
if plugins and entrytosend:
|
if plugins and entrytosend:
|
||||||
activate_plugins(plugins)
|
activate_plugins(plugins, finaltweet)
|
||||||
# do not forget to close cache (shelf object)
|
# do not forget to close cache (shelf object)
|
||||||
cache.close()
|
cache.close()
|
||||||
# release the lock file
|
# release the lock file
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
# standard libraires imports
|
# standard libraires imports
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
def activate_plugins(entrytosend):
|
def activate_plugins(plugins, finaltweet):
|
||||||
'''activate plugins'''
|
'''activate plugins'''
|
||||||
for plugin in plugins:
|
for plugin in plugins:
|
||||||
capitalizedplugin = plugin.title()
|
capitalizedplugin = plugin.title()
|
||||||
|
|
Loading…
Reference in a new issue