Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hmlendea/mastodon-random-facts-bot
Mastodon bot that posts random facts from a predefined list
https://github.com/hmlendea/mastodon-random-facts-bot
bot mastodon
Last synced: about 2 months ago
JSON representation
Mastodon bot that posts random facts from a predefined list
- Host: GitHub
- URL: https://github.com/hmlendea/mastodon-random-facts-bot
- Owner: hmlendea
- License: gpl-3.0
- Created: 2022-12-23T15:30:01.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-21T09:42:19.000Z (9 months ago)
- Last Synced: 2024-04-13T13:49:51.481Z (8 months ago)
- Topics: bot, mastodon
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![Donate](https://img.shields.io/badge/-%E2%99%A5%20Donate-%23ff69b4)](https://hmlendea.go.ro/fund.html)
# About
This is Python bot that posts a random fact to Mastodon from a predefined list of facts.
The facts are stored in a file and the bot selects a one to post.
It's designed to keep Mastodon users informed and entertained by posting a new fact on a regular basis.
# Usage
## Running in the background
### Using `systemd`
`/usr/lib/systemd/system/mastodon-random-facts-bot.timer`:
```gitconfig
[Unit]
Description=Periodically activates the random facts bot for Mastodon[Timer]
OnBootSec=15min
OnUnitActiveSec=25min[Install]
WantedBy=timers.target
````/usr/lib/systemd/system/mastodon-random-facts-bot.service`:
```gitconfig
[Unit]
Description=RSS bot for Mastodon
After=network.target[Service]
WorkingDirectory=/home/horatiu/bots/mastodon-rss-bot
ExecStart=/bin/bash /home/horatiu/bots/mastodon-rss-bot/run.sh
User=horatiu
RuntimeMaxSec=60[Install]
WantedBy=multi-user.target
```