Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrrfv/mastodon-scheduled-toot
Mastodon bot that posts according to a cron-like schedule
https://github.com/mrrfv/mastodon-scheduled-toot
cron javascript mastodon mastodon-api mastodon-bot mastodon-scheduled-toot nodejs schedule
Last synced: 3 days ago
JSON representation
Mastodon bot that posts according to a cron-like schedule
- Host: GitHub
- URL: https://github.com/mrrfv/mastodon-scheduled-toot
- Owner: mrrfv
- License: bsd-3-clause
- Created: 2023-07-09T12:38:13.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-12T14:59:33.000Z (11 days ago)
- Last Synced: 2024-12-12T15:41:09.963Z (11 days ago)
- Topics: cron, javascript, mastodon, mastodon-api, mastodon-bot, mastodon-scheduled-toot, nodejs, schedule
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mastodon Scheduled Post Bot
This is a Node.js application that uses the Mastodon API to post a toot at a specified time.
## Usage
1. Run `npm install` to install dependencies.
2. Go to your Mastodon instance preferences and click Development. Create a new application and copy the access token.
3. Copy `.env.example` to `.env` and fill in the values.
4. Run `node index.js`.## Docker
You can also run this bot in a Docker container. To do so, follow step 2 from the usage guide and from use the following command:
```bash
docker run -d \
-e TZ="Europe/Berlin" \
-e CRON_SCHEDULE="0 17 * * *" \
-e MASTODON_INSTANCE_URL="your mastodon instance url, for example https://mastodon.social" \
-e MASTODON_USER_TOKEN="your mastodon access token" \
-e MASTODON_STATUS_TEXT="your toot text" \
# takes priority over MASTODON_STATUS_TEXT
# -e MASTODON_STATUS_TEXTS_RANDOM="[\"your toot text 1\", \"your toot text 2\"]" \
-e MASTODON_STATUS_VISIBILITY="unlisted" \
--restart always \
--name mastobot \
mrrfv/mastodon-scheduled-toot:latest
```Change the value of the `TZ` environment variable for scheduling to work properly.
## License
BSD 3-Clause License. See `LICENSE` for more information.