Generates RSS feed from Mastodon home timeline.
Creates separate RSS files for each account you following. But unlike the built-in RSS feed, here the feed is formed from a timeline and includes all types of activity, including boosts.
The script is written in Node.js and can be installed via NPM:
npm install -g mastodon-rss
To initialize configuration, register application and generate authorization token, run mastodon-rss with --login
key.
For example:
mastodon-rss --config=/etc/mastodon-rss/config.json --instance=https://mastodon.social --login
Here we additionally specify the path to the configuration file and the URL of the Mastodon instance, that will be used to interact with the API.
Default configuration path is:
~/.config/mastodon-rss/config.json
Default instance is:
https://mastodon.social
Let's create RSS files for all following accounts. They will contain only a description of the channel, without posts. This is necessary so that you can already subscribe to channels without waiting for a post from this user to appear in your timeline.
You need to specify your account name here. For example:
mastodon-rss --config=/etc/mastodon-rss/config.json --prepare-following-for=avol_v@mastodon.social
Run it regularly, for example in a CRON task:
mastodon-rss --config=/etc/mastodon-rss/config.json
You can change some setting in the config file:
dropOlderThanHours
— posts older than this value will be removed from RSS file (24
by default).timelineJsonPath
— where to store timeline cache (timeline.json
near the config file by default).rssDirectoryPath
— directory where to store RSS files (feeds
near the config file by default).