From 611f235aff70c34551f1d7bfbc0513850988a49c Mon Sep 17 00:00:00 2001 From: cquest Date: Wed, 3 Apr 2019 17:52:36 +0200 Subject: [PATCH] howto use rss/atom feed --- cron-sample.sh | 6 +++++- tootbot.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cron-sample.sh b/cron-sample.sh index 2c362dc..d1946d2 100644 --- a/cron-sample.sh +++ b/cron-sample.sh @@ -2,10 +2,14 @@ # source /home/cquest/.virtualenvs/tootbot/bin/activate # parameters: -# 1- twitter account to clone +# 1- twitter account to clone / or rss/atom feed URL # 2- mastodon login # 3- mastodon password # 4- instance domain (https:// is automatically added) +# 5- max age (in days) +# 6- footer tags to add (optionnal) python3 tootbot.py geonym_fr geonym@amicale.net **password** test.amicale.net python3 tootbot.py cq94 cquest@amicale.net **password** test.amicale.net + +python3 tootbot.py https://www.data.gouv.fr/fr/datasets/recent.atom cquest+opendata@amicale.net **password** amicale.net 2 "#dataset #opendata #datagouvfr" diff --git a/tootbot.py b/tootbot.py index 8858a0e..a62953b 100755 --- a/tootbot.py +++ b/tootbot.py @@ -9,7 +9,7 @@ from mastodon import Mastodon import requests if len(sys.argv) < 4: - print("Usage: python3 tootbot.py twitter_account mastodon_login mastodon_passwd mastodon_instance") # noqa + print("Usage: python3 tootbot.py twitter_account mastodon_login mastodon_passwd mastodon_instance [max_days [footer_tags]]") # noqa sys.exit(1) # sqlite db to store processed tweets (and corresponding toots ids)