diff --git a/feed2toot/confparse.py b/feed2toot/confparse.py index af31575..efc1dfb 100644 --- a/feed2toot/confparse.py +++ b/feed2toot/confparse.py @@ -30,6 +30,7 @@ import feedparser # feed2toot library imports from feed2toot.confparsers.cache import parsecache from feed2toot.confparsers.hashtaglist import parsehashtaglist +from feed2toot.confparsers.hashtags.nohashtags import parsenotagsintoot from feed2toot.confparsers.feedparser import parsefeedparser from feed2toot.confparsers.lock import parselock from feed2toot.confparsers.media import parsemedia @@ -99,9 +100,10 @@ class ConfParse: ########################### options['cachefile'], options['cache_limit'] = parsecache(self.clioptions.cachefile, config) ########################### - # the hashtag section + # the hashtaglist section ########################### options['hashtaglist'] = parsehashtaglist(self.clioptions.hashtaglist, config) + options['notagsintoot'] = parsenotagsintoot(config) ########################### # the media section ########################### diff --git a/feed2toot/confparsers/hashtags/__init__.py b/feed2toot/confparsers/hashtags/__init__.py new file mode 100644 index 0000000..d77b4df --- /dev/null +++ b/feed2toot/confparsers/hashtags/__init__.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 +# vim:ts=4:sw=4:ft=python:fileencoding=utf-8 +# Copyright © 2017-2019 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 diff --git a/feed2toot/confparsers/hashtags/nohashtags.py b/feed2toot/confparsers/hashtags/nohashtags.py new file mode 100644 index 0000000..adcf448 --- /dev/null +++ b/feed2toot/confparsers/hashtags/nohashtags.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# Copyright © 2015-2019 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 tootmaxlen: return ''.join([finaltweet[0:-3], '...']) else: