https://github.com/tassoman/mk-feed-bot
RSS Newsfeed reader bot for Misskey
https://github.com/tassoman/mk-feed-bot
bot fediverse-bot misskey misskey-bot newsfeed python python3 rss rss-aggregator rss-reader
Last synced: 3 months ago
JSON representation
RSS Newsfeed reader bot for Misskey
- Host: GitHub
- URL: https://github.com/tassoman/mk-feed-bot
- Owner: tassoman
- License: gpl-3.0
- Created: 2022-08-11T22:06:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-10-15T11:53:08.000Z (5 months ago)
- Last Synced: 2025-10-16T05:08:43.853Z (5 months ago)
- Topics: bot, fediverse-bot, misskey, misskey-bot, newsfeed, python, python3, rss, rss-aggregator, rss-reader
- Language: Python
- Homepage: https://misskey.social/@newsfeed
- Size: 61.5 KB
- Stars: 13
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RSS Newsfeed reader bot for Misskey 😻
This Python bot posts RSS news from your chosen feeds. You can choose the frequency of posting (in minutes) and the amount of Notes to post each time.
Before posting it starts a **sentiment analysis** then flags with CW (Content Warning) and :NSFW: if sentiment is negative. (war, deaths, bad news)
News and Notes flows are asyncronous, so that it can pick up always the fresher news and Note as soon as possible.
Notes will not bloat your Misskey profile, because get deleted if older than a month.
>[!TIP]
> Featured on [Misskey Advent Calendar 2025, on December 12th](https://adventar.org/calendars/11291)

## Setup
Please, follow this instructions once, before starting:
### Create an account on Misskey and get the APIKEY for your bot.
- Get inside your Misskey instance
- Create a new account
- Remember to set `isBot = True`
- Visit the page: `https://your.misskey.instance/settings/api`
- Create a new API-key having at minimum `notes:write` privilege.
### Prepare a Python virtual environment
Please use python3. In latest GNU/Linux distros, it's already in as default. Otherwise you'll need `python3-venv` package with dependencies.
1. `git clone` this repository, to get the source code, or download the zip file
2. `python -m venv .venv` Python sandboxed enviroment creation
3. `. .venv/bin/activate` Environment activation
4. `pip install -r requirements.txt` Dependencies installation
5. `python -m spacy download en_core_web_lg` Gets sentiment analysis data (for NSFW posts)
## Configuration
Now you installed the software, you need a small amount of configuration.
### Fill the bot with RSS feed
First of all, put the RSS Feed source URLS into the file `sources.txt`, line by line.
### Environment variables
Now copy `.env-example` in `.env` file to fill in your personal configuration:
- **HOST** your Misskey domain
- **APIKEY** app's credentials created before
- **VISIBILITY** choose [in which Timeline to post](https://misskey-hub.net/en/docs/features/timeline.html).
- **LOCAL** boolean for federated Notes
- **EVERY_MINUTES** posting frequency
- **HOW_MANY** posted Notes amount
## Run!
Inside your python environment:
`(env) $ python feed_bot.py`
It will setup if needed. Then will start three scheduled jobs.
### Service daemon configuration
You probably want to run it detached from the console by using `nohup` or running into a `screen` command. So that you can close the ssh shell without stopping.
The software has ability to avoid multiple concurrent runs.
## Stop!
To stop it, just press `CTRL+C` in the console.
To exit the Python environment type: `deactivate`. You're aware of activation because of your shell starts with: (env)
## Upgrade
It's super easy, just Stop! Then `git pull` to check for updates. Then `pip-review -a` to update the libraries. Needs a restart to get things done.
## Development
If you plan to contribute, please run this command, after installation noted before.
```bash
pre-commmit install
```