From affc3b6d2821773e72c2596fcf257bcb497eb395 Mon Sep 17 00:00:00 2001 From: Matthias Henze Date: Wed, 12 Sep 2018 10:53:13 +0200 Subject: [PATCH] allowed toot formating and made tags optional --- feed2toot/confparse.py | 5 ++++ feed2toot/confparsers/rss/addtags.py | 34 ++++++++++++++++++++++++++++ feed2toot/main.py | 20 +++++++--------- 3 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 feed2toot/confparsers/rss/addtags.py diff --git a/feed2toot/confparse.py b/feed2toot/confparse.py index ae5a723..a44d5e3 100644 --- a/feed2toot/confparse.py +++ b/feed2toot/confparse.py @@ -37,6 +37,7 @@ from feed2toot.confparsers.rss.pattern import parsepattern from feed2toot.confparsers.rss.toot import parsetoot from feed2toot.confparsers.rss.uri import parseuri from feed2toot.confparsers.rss.urilist import parseurilist +from feed2toot.confparsers.rss.addtags import parseaddtags class ConfParse: '''ConfParse class''' @@ -68,6 +69,10 @@ class ConfParse: # pattern and patter_case_sensitive format option ################################################# options['patterns'], options['patternscasesensitive'] = parsepattern(config) + ############################### + # addtags option, default: True + ############################### + options['addtags'] = parseaddtags(config) ################# # uri_list option ################# diff --git a/feed2toot/confparsers/rss/addtags.py b/feed2toot/confparsers/rss/addtags.py new file mode 100644 index 0000000..55bedf2 --- /dev/null +++ b/feed2toot/confparsers/rss/addtags.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# Copyright © 2015-2017 Carl Chenet +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see