A bot written in golang to post RSS feeds to Mastodon. Show must go on!
| cmd | ||
| internal | ||
| .env.example | ||
| .gitignore | ||
| config.json.example | ||
| docker-compose.yaml | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| README.md | ||
RssMastGo10
A bot written in golang to post rss feeds to Mastodon. Show must go on: Rss Mast Go 10 (10 pronunce as "on" in Turkish)
Tech Stack
- Database: PostgreSQL
- Backend (Code): Golang (1.24.4)
- Other: Docker/Docker Compose
TODO (my needs)(in order)
- get & parse rss
- connect to Mastodon application
- ability to publish post
- set oldest rss date to fetch (to avoid fetching too old posts in first run)
- store already published posts in a local database
- predefined hashtag support
- config file support
- image support
- ability to include/exclude mentions/hashtags
- dockerized, easy installable/usable container
- multiple rss feed support
- self-reply support
Maybe Future
- authentication for rss url (for private nitter instances)
- ability separate posts (for posts that exceed character limit)
- run as daemon (service) and regularly fetch rss [using cronjob for now]
- mutliple Mastodon application support
- twitter account & rss export support (to eliminate need of Nitter)
- reply support
- retweet filter support
- video support
- message edit support
- image & video compression support
- media alt support (but how?)
- ability to replace tracking urls
- more management / boost / star / deletion abilities
- auto profile info update
- poll support
Usage
Requiements
- a rss feed
- a Mastodon account
- a linux server/machine with go 1.24+/postgresql or docker and docker compose installed any(?) device
Installation
- create a mastodon application with
write:mediaandwrite:statusesscopes - git clone repo
- fill .env and config.json files (see example files for help)
- set up docker and docker compose
docker compose up --build -din root folder- set up cronjob and run app or app container with a period
References
External Dependencies
- github.com/mmcdole/gofeed to parse rss feeds
- github.com/mattn/go-mastodon to connect/post to mastodon
- github.com/joho/godotenv to parse environment values