From 475bdae9259d6fc04577cac4486258b9f4e0b4c5 Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Fri, 26 Mar 2021 18:08:39 +0100 Subject: [PATCH 1/3] add __init__ for scripts dir. fixes #62 --- scripts/__init__.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 scripts/__init__.py diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000..979c3de --- /dev/null +++ b/scripts/__init__.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 +# vim:ts=4:sw=4:ft=python:fileencoding=utf-8 +# Copyright © 2015-2021 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 From 9ae33644e563edd4c05cbe41bd056574f695d1b9 Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Fri, 26 Mar 2021 18:18:46 +0100 Subject: [PATCH 2/3] bump version and update version --- CHANGELOG | 5 +++++ README.md | 2 +- docs/source/conf.py | 6 +++--- docs/source/install.rst | 2 +- feed2toot.py | 2 +- feed2toot/__init__.py | 2 +- feed2toot/addtags.py | 2 +- feed2toot/cliparse.py | 4 ++-- feed2toot/confparse.py | 2 +- feed2toot/confparsers/__init__.py | 2 +- feed2toot/confparsers/cache.py | 2 +- feed2toot/confparsers/feedparser.py | 2 +- feed2toot/confparsers/hashtaglist.py | 2 +- feed2toot/confparsers/hashtags/__init__.py | 2 +- feed2toot/confparsers/hashtags/nohashtags.py | 2 +- feed2toot/confparsers/lock.py | 2 +- feed2toot/confparsers/media.py | 2 +- feed2toot/confparsers/plugins.py | 2 +- feed2toot/confparsers/rss/__init__.py | 2 +- feed2toot/confparsers/rss/addtags.py | 2 +- feed2toot/confparsers/rss/ignoressl.py | 2 +- feed2toot/confparsers/rss/pattern.py | 2 +- feed2toot/confparsers/rss/toot.py | 2 +- feed2toot/confparsers/rss/tootmaxlen.py | 2 +- feed2toot/confparsers/rss/uri.py | 2 +- feed2toot/confparsers/rss/urilist.py | 2 +- feed2toot/feedcache.py | 2 +- feed2toot/filterentry.py | 2 +- feed2toot/hashtags.py | 2 +- feed2toot/lock.py | 2 +- feed2toot/main.py | 2 +- feed2toot/message.py | 2 +- feed2toot/removeduplicates.py | 2 +- feed2toot/rss.py | 2 +- feed2toot/sortentries.py | 2 +- feed2toot/tootpost.py | 2 +- scripts/feed2toot | 2 +- scripts/register_feed2toot_app | 2 +- setup.py | 4 ++-- 39 files changed, 47 insertions(+), 42 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 39af57a..55a14f7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +## [0.17] - 2021-03-26 +### Changed +- fix install bug while installing from sources +- bump changelog + ## [0.16] - 2020-12-09 ### Added - scripts/register_feed2toot_app: --client-credentials-file option to change the filename in which the client credentials are stored diff --git a/README.md b/README.md index e53e052..61b4fcd 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Alternatively you can donate cryptocurrencies: [Installation Guide](http://feed2toot.readthedocs.io/en/latest/install.html)* - # tar zxvf feed2toot-0.16.tar.gz + # tar zxvf feed2toot-0.17.tar.gz # cd feed2toot # python3 setup.py install # # or diff --git a/docs/source/conf.py b/docs/source/conf.py index ddef383..54b10dc 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,16 +48,16 @@ master_doc = 'index' # General information about the project. project = 'feed2toot' -copyright = '2015-2020, Carl Chenet ' +copyright = '2015-2021, Carl Chenet ' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.16' +version = '0.17' # The full version, including alpha/beta/rc tags. -release = '0.16' +release = '0.17' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/install.rst b/docs/source/install.rst index cd00e3a..3e885d7 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -25,7 +25,7 @@ Alternatively, Setuptools may be installed to a user-local path:: * Untar the tarball and go to the source directory with the following commands:: - $ tar zxvf feed2toot-0.16.tar.gz + $ tar zxvf feed2toot-0.17.tar.gz $ cd feed2toot * Next, to install Feed2toot on your computer, type the following command with the root user:: diff --git a/feed2toot.py b/feed2toot.py index 416e53b..a53bf2a 100755 --- a/feed2toot.py +++ b/feed2toot.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/__init__.py b/feed2toot/__init__.py index dad5d70..979c3de 100644 --- a/feed2toot/__init__.py +++ b/feed2toot/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/addtags.py b/feed2toot/addtags.py index 2cd8668..cca0954 100644 --- a/feed2toot/addtags.py +++ b/feed2toot/addtags.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/cliparse.py b/feed2toot/cliparse.py index 663a1ba..e8d8739 100644 --- a/feed2toot/cliparse.py +++ b/feed2toot/cliparse.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 @@ -24,7 +24,7 @@ import os import os.path import sys -__version__ = '0.16' +__version__ = '0.17' class CliParse: '''CliParse class''' diff --git a/feed2toot/confparse.py b/feed2toot/confparse.py index baa67c3..54010a2 100644 --- a/feed2toot/confparse.py +++ b/feed2toot/confparse.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/__init__.py b/feed2toot/confparsers/__init__.py index dad5d70..979c3de 100644 --- a/feed2toot/confparsers/__init__.py +++ b/feed2toot/confparsers/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/cache.py b/feed2toot/confparsers/cache.py index 2ca2515..79c013d 100644 --- a/feed2toot/confparsers/cache.py +++ b/feed2toot/confparsers/cache.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/feedparser.py b/feed2toot/confparsers/feedparser.py index c7467ba..cf72889 100644 --- a/feed2toot/confparsers/feedparser.py +++ b/feed2toot/confparsers/feedparser.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/hashtaglist.py b/feed2toot/confparsers/hashtaglist.py index d965cfa..ffdf710 100644 --- a/feed2toot/confparsers/hashtaglist.py +++ b/feed2toot/confparsers/hashtaglist.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/hashtags/__init__.py b/feed2toot/confparsers/hashtags/__init__.py index dad5d70..979c3de 100644 --- a/feed2toot/confparsers/hashtags/__init__.py +++ b/feed2toot/confparsers/hashtags/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/hashtags/nohashtags.py b/feed2toot/confparsers/hashtags/nohashtags.py index 42a985b..0cab8b6 100644 --- a/feed2toot/confparsers/hashtags/nohashtags.py +++ b/feed2toot/confparsers/hashtags/nohashtags.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/lock.py b/feed2toot/confparsers/lock.py index c3ed485..45e7718 100644 --- a/feed2toot/confparsers/lock.py +++ b/feed2toot/confparsers/lock.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/media.py b/feed2toot/confparsers/media.py index 47e2708..2cd4f1b 100644 --- a/feed2toot/confparsers/media.py +++ b/feed2toot/confparsers/media.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/plugins.py b/feed2toot/confparsers/plugins.py index 05f3b80..0911a6b 100644 --- a/feed2toot/confparsers/plugins.py +++ b/feed2toot/confparsers/plugins.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/rss/__init__.py b/feed2toot/confparsers/rss/__init__.py index dad5d70..979c3de 100644 --- a/feed2toot/confparsers/rss/__init__.py +++ b/feed2toot/confparsers/rss/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/rss/addtags.py b/feed2toot/confparsers/rss/addtags.py index 4fc611d..6808254 100644 --- a/feed2toot/confparsers/rss/addtags.py +++ b/feed2toot/confparsers/rss/addtags.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/rss/ignoressl.py b/feed2toot/confparsers/rss/ignoressl.py index da67dcb..f1f0340 100644 --- a/feed2toot/confparsers/rss/ignoressl.py +++ b/feed2toot/confparsers/rss/ignoressl.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/rss/pattern.py b/feed2toot/confparsers/rss/pattern.py index cbe635f..e6b858d 100644 --- a/feed2toot/confparsers/rss/pattern.py +++ b/feed2toot/confparsers/rss/pattern.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/rss/toot.py b/feed2toot/confparsers/rss/toot.py index 5f8b96c..58c8f56 100644 --- a/feed2toot/confparsers/rss/toot.py +++ b/feed2toot/confparsers/rss/toot.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/rss/tootmaxlen.py b/feed2toot/confparsers/rss/tootmaxlen.py index 88af10c..eb2a448 100644 --- a/feed2toot/confparsers/rss/tootmaxlen.py +++ b/feed2toot/confparsers/rss/tootmaxlen.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/rss/uri.py b/feed2toot/confparsers/rss/uri.py index 7e0a1b2..e7f88b2 100644 --- a/feed2toot/confparsers/rss/uri.py +++ b/feed2toot/confparsers/rss/uri.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/confparsers/rss/urilist.py b/feed2toot/confparsers/rss/urilist.py index 9027498..11265a2 100644 --- a/feed2toot/confparsers/rss/urilist.py +++ b/feed2toot/confparsers/rss/urilist.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/feedcache.py b/feed2toot/feedcache.py index 8b85edd..9bfad65 100644 --- a/feed2toot/feedcache.py +++ b/feed2toot/feedcache.py @@ -1,5 +1,5 @@ # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/filterentry.py b/feed2toot/filterentry.py index 44608d5..37a7a76 100644 --- a/feed2toot/filterentry.py +++ b/feed2toot/filterentry.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/hashtags.py b/feed2toot/hashtags.py index 893ba8c..6354614 100644 --- a/feed2toot/hashtags.py +++ b/feed2toot/hashtags.py @@ -1,5 +1,5 @@ # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/lock.py b/feed2toot/lock.py index e58ff3e..e03c56c 100644 --- a/feed2toot/lock.py +++ b/feed2toot/lock.py @@ -1,5 +1,5 @@ # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/main.py b/feed2toot/main.py index da76c73..1c70e03 100644 --- a/feed2toot/main.py +++ b/feed2toot/main.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/message.py b/feed2toot/message.py index a71eb20..ef431d6 100644 --- a/feed2toot/message.py +++ b/feed2toot/message.py @@ -1,5 +1,5 @@ # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/removeduplicates.py b/feed2toot/removeduplicates.py index f7f76c2..8141d4f 100644 --- a/feed2toot/removeduplicates.py +++ b/feed2toot/removeduplicates.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/rss.py b/feed2toot/rss.py index 27e63f4..da271d9 100644 --- a/feed2toot/rss.py +++ b/feed2toot/rss.py @@ -1,5 +1,5 @@ # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/sortentries.py b/feed2toot/sortentries.py index d88920b..f5ac5ef 100644 --- a/feed2toot/sortentries.py +++ b/feed2toot/sortentries.py @@ -1,5 +1,5 @@ # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/feed2toot/tootpost.py b/feed2toot/tootpost.py index 43eae3f..9cf7d0d 100644 --- a/feed2toot/tootpost.py +++ b/feed2toot/tootpost.py @@ -1,5 +1,5 @@ # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/scripts/feed2toot b/scripts/feed2toot index 0391cdb..09cf4dd 100755 --- a/scripts/feed2toot +++ b/scripts/feed2toot @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/scripts/register_feed2toot_app b/scripts/register_feed2toot_app index 5096c08..22975e8 100755 --- a/scripts/register_feed2toot_app +++ b/scripts/register_feed2toot_app @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # vim:ts=4:sw=4:ft=python:fileencoding=utf-8 -# Copyright © 2015-2020 Carl Chenet +# Copyright © 2015-2021 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 diff --git a/setup.py b/setup.py index 7fdb44b..6ce1662 100755 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright 2015-2020 Carl Chenet +# Copyright 2015-2021 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 @@ -31,7 +31,7 @@ CLASSIFIERS = [ setup( name='feed2toot', - version='0.16', + version='0.17', license='GNU GPL v3', description='Parse rss feeds and send new posts to Mastodon', long_description='Parse rss feeds and send new posts to the Mastodon social network', From 9782f0321f96b0d853b1b3bcc8333672d6961367 Mon Sep 17 00:00:00 2001 From: MassiveBox Date: Sun, 23 Oct 2022 22:09:20 +0200 Subject: [PATCH 3/3] Add docker support - Allow setup script to get credentials from flags - Add Dockerfile and docker_entrypoint - Edit README for forked version --- .gitignore | 3 ++ Dockerfile | 13 +++++ README.md | 87 +++++++++++++--------------------- docker_entrypoint.sh | 12 +++++ scripts/register_feed2toot_app | 21 ++++++-- 5 files changed, 78 insertions(+), 58 deletions(-) create mode 100644 Dockerfile create mode 100755 docker_entrypoint.sh diff --git a/.gitignore b/.gitignore index f5189cf..90063a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ docs/build/ __pycache__ feedlist +data *.swp *.pyc *.db @@ -8,3 +9,5 @@ feedlist *.txt *.bck *.png +*.yml +.env diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c6ca6e7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.7-bullseye + +ADD . /app +WORKDIR /app + +RUN python3 setup.py install; \ + chmod +x docker_entrypoint.sh; \ + mkdir -p /data /root/.config; \ + rm -rf docke.yml + +WORKDIR /data + +CMD ["/app/docker_entrypoint.sh"] diff --git a/README.md b/README.md index 61b4fcd..dc85036 100644 --- a/README.md +++ b/README.md @@ -1,64 +1,45 @@ +# Feed2Toot Docker + +Feed2Toot Docker is a fork of [chaica/feed2toot](https://gitlab.com/chaica/feed2toot) that allows for simple deployment over Docker. In the future I'll try to add other useful features. + +### Usage + +With Docker Compose: +```yaml +version: '3' + +services: + feed2toot: + image: gitea.massivebox.net/massivebox/feed2toot-docker:latest + environment: + - USERNAME=sampleusername@sampleinstance.url + - PASSWORD=samplepassword + - INSTANCE=https://sampleinstance.url + restart: always + volumes: + - ./data:/data +``` +Insert your full username (including the part with your homeserver's address), password and instance URL where required. +You also need to create a working `feed2toot.ini` in the `./data` folder. See the [upstream docs](`https://feed2toot.readthedocs.io/en/latest/configure.html#create-feed2toot-configuration`) for the guide. + +After the first successful run, you can remove the entire `environment` block if you want, however, if you delete and re-create the container, you will need to put it back. + +### Support + +Don't ask the upstream developers for help, if something is broken it's more likely that it is my fault. +You can get support by opening an [issue](https://gitea.massivebox.net/massivebox/feed2toot-docker/issues), or by [contacting me](https://massivebox.net/contact.html), or in the [Matrix support room](https://matrix.to/#/#support:massivebox.net). + ### Feed2toot -Feed2toot automatically parses rss feeds, identifies new posts and posts them on the [Mastodon](https://mastodon.social) social network. -For the full documentation, [read it online](https://feed2toot.readthedocs.io/en/latest/). - -If you would like, you can [support the development of this project on Liberapay](https://liberapay.com/carlchenet/). -Alternatively you can donate cryptocurrencies: +The following links and addresses are the upstream developers'. I don't want donations for this project, but I encourage you to donate to them. +- [Liberapay](https://liberapay.com/carlchenet/) - BTC: 1AW12Zw93rx4NzWn5evcG7RNNEM2RSLmAC - XMR: 43GGv8KzVhxehv832FWPTF7FSVuWjuBarFd17QP163uxMaFyoqwmDf1aiRtS5jWgCiRsi73yqedNJJ6V1La2joznKHGAhDi -### Quick Install - -* Install Feed2toot from PyPI - - # pip3 install feed2toot - -* Install Feed2toot from sources - *(see the installation guide for full details) - [Installation Guide](http://feed2toot.readthedocs.io/en/latest/install.html)* - - - # tar zxvf feed2toot-0.17.tar.gz - # cd feed2toot - # python3 setup.py install - # # or - # python3 setup.py install --install-scripts=/usr/bin - -### Create the authorization for the Feed2toot app - -* Just launch the following command:: - - $ register_feed2toot_app - -### Use Feed2toot - -* Create or modify feed2toot.ini file in order to configure feed2toot: - - [mastodon] - instance_url=https://mastodon.social - user_credentials=feed2toot_usercred.txt - client_credentials=feed2toot_clientcred.txt - ; Default visibility is public, but you can override it: - ; toot_visibility=unlisted - - [cache] - cachefile=cache.db - - [rss] - uri=https://www.journalduhacker.net/rss - toot={title} {link} - - [hashtaglist] - several_words_hashtags_list=hashtags.txt - -* Launch Feed2toot - - $ feed2toot -c /path/to/feed2toot.ini - ### Authors +* MassiveBox * Carl Chenet * Antoine Beaupré * First developed by Todd Eddy diff --git a/docker_entrypoint.sh b/docker_entrypoint.sh new file mode 100755 index 0000000..7360431 --- /dev/null +++ b/docker_entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +cd /data + +if [[ ! -f "feed2toot_clientcred.txt" || ! -f "feed2toot_usercred.txt" ]]; then + register_feed2toot_app --instance $INSTANCE --username $USERNAME --password $PASSWORD +fi + +while :; do + feed2toot -c ./feed2toot.ini + sleep 5m +done diff --git a/scripts/register_feed2toot_app b/scripts/register_feed2toot_app index 22975e8..7453ecc 100755 --- a/scripts/register_feed2toot_app +++ b/scripts/register_feed2toot_app @@ -34,6 +34,9 @@ parser.add_argument('--version', action='version', version=__version__) parser.add_argument('--client-credentials-file', dest='clientcredfile', help='the name of the client credentials for the Mastodon app', default='feed2toot_clientcred.txt') parser.add_argument('--user-credentials-file', dest='usercredfile', help='the name of the user credentials for the Mastodon app', default='feed2toot_usercred.txt') parser.add_argument('--name', help='the name of the Mastodon app', default='feed2toot') +parser.add_argument('--instance', help='the URL of the Mastodon instance') +parser.add_argument('--username', help='the username of your Mastodon account') +parser.add_argument('--password', help='the password of your Mastodon account') opts = parser.parse_args() clientcredfile=opts.clientcredfile @@ -44,7 +47,9 @@ print(headline) # get the instance -instance = input('Mastodon instance URL (defaults to https://mastodon.social): ') +instance = opts.instance +if not instance: + instance = input('Mastodon instance URL (defaults to https://mastodon.social): ') if not instance: instance = 'https://mastodon.social' elif not instance.startswith('http'): @@ -52,19 +57,25 @@ elif not instance.startswith('http'): # get the username userok = False +quit_on_error = True while not userok: - user = input('Mastodon login: ') + user = opts.username + if not user: + user = input('Mastodon login: ') + quit_on_error = False if not user: print('Your Mastodon username can not be empty.') - userok = False elif '@' not in user or '.' not in user: print('Your Mastodon username should be an email.') - userok = False else: userok = True + if not userok and quit_on_error: + exit() # get the password -password = getpass(prompt='Mastodon password: ') +password = opts.password +if not password: + password = getpass(prompt='Mastodon password: ') Mastodon.create_app( opts.name, api_base_url=instance,