Posting automatically from a RSS feed


#1

Is there a recommended option to post automatically from a RSS feed?

I have found this: GitHub - poga/rss2mastodon: publish a rss feed to mastodon. Has anyone tested it? Are there other ways?


#2

Could be done pretty trivially with Halcy’s Mastodon.py, that’s what I’d use

or there are bot templates here -> Glitch - The Friendly, Creative Community


#3

I use Zapier.
Use RSS as tritter and use Webhook as action.
Add Authorization header with value Bearer ~~~~


#4

Thank you for your ideas!

About Halcy’s Mastodon.py, I am not a programmer and I’d rather use a bot that already exists.

Zapier is a good idea, and I hadn’t thought about it. However, due to the characteristics of our project, we would prefer to avoid a commercial service and go for free software / self-hosted instead.

I have found another bot… Carl Chenet / feed2toot · GitLab


#5

I’m the author of Feed2toot, which is a Free Software, widely used and fully documented. Let me know if you have questions installing/using it.


#6

I wrote a program called feed2exec that can call into random programs based on new items in a RSS feed. I use it in combination with the toot client to send posts into Mastodon, and it works pretty well. An example of how to setup the config is this:

feed2exec add "My site" http://example.com/blog/feed --output exec --args 'toot post "{item.title} {item.link}"'

Toot needs to be configured first, with something like:

toot login

or:

toot login_browser

if you use 2FA in your account.

Hope that helps!


#7

@chaica @anarcat thank you for your quick replies.

I am playing with each of your approaches. I have the same questions for both:

  • Does your tool work in the background once it is executed, or do I need to setup a cron task to trigger it periodically?

  • Is it possible to update multiple accounts with their own feeds? The documentation mentions one pair account-feed, but it is possible to maintain multiple pairs account-feed?


#8

It needs a cron job.

feed2exec is pretty dumb: it does whatever toot does. I haven’t looked, but if there’s a way that toot can update multiple feeds, so can feed2exec, even if it might mean crawling the same feed multiple times to call multiple commands. That’s how I send tweets and toots at the same time for my feeds, although it might be possible to use a wrapper script instead, naturally.


#9

Alright, at the end I went for @chaica’s Feed2toot. I tried the Feed2exec + toot as well, which I believe can be more flexible and powerful, but being my use case quite straightforward I went for what worked out of the box.

First result: ContratiempoHistoria (@contratiempohis@confederac.io) - Red Confederada

Answering my own questions, the Feed2tood documentation explains how to set up a cron task. Although the documentation doesn’t mention explicitly how to run multiple feeds for multiple accounts, I believe it is just a matter of identifying multiple accounts and then have separate .ini & related files for each of them. haven’t tried yet, but I will report here when I do.

Thank you for all your feedback and help!


#10

@icaria36 Yes you’re right, multiple feeds for multiple accounts will require the option uri_list to define your multiple feeds and each account requires a different *.ini file. I’ll update the documentation with this case.