From e00d39dcce67a86e77130fd301eac8ecee34d3ee Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Fri, 21 Apr 2017 03:51:09 +0200 Subject: [PATCH] add parameter toot for [rss] section. fixes #10 --- feed2toot/confparse.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/feed2toot/confparse.py b/feed2toot/confparse.py index 18a0ea4..56f67a6 100644 --- a/feed2toot/confparse.py +++ b/feed2toot/confparse.py @@ -55,11 +55,14 @@ class ConfParse(object): ############################ # tweet option ############################ - confoption = 'tweet' - if config.has_option(section, confoption): + oldconfoption = 'tweet' + confoption = 'toot' + if config.has_option(section, oldconfoption): + self.tweetformat = config.get(section, oldconfoption) + elif config.has_option(section, confoption): self.tweetformat = config.get(section, confoption) else: - sys.exit('You should define a format for your tweet with the keyword "tweet" in the [rss] section') + sys.exit('You should define a format for your tweet with the parameter "{confoption}" in the [{section}] section'.format(confoption=confoption, section=section)) ############################ # pattern format option ############################