Sam Therapy
9e31c4edff
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Sam Therapy <sam@samtherapy.net> |
||
---|---|---|
src | ||
.drone.yml | ||
.eslintrc.json | ||
.gitignore | ||
config.sample.jsonc | ||
LICENSE | ||
package.json | ||
README.md | ||
tsconfig.json | ||
yarn.lock |
fediverse-imagebot
A bot that posts (currently only local) images to the Fediverse.
Compatible with Mastodon, Misskey and Pleroma!
Downloading pre-built binaries
Download prebuilt binaries from here (currently only supports x64), or build from source, instructions below.
Running from Source
- You need to have
npm
andnodejs
installed.
- Node 15 or greater is required.
- Install
yarn
:
npm install --global yarn
- This may be need to ran with
sudo
depending on your installation.
-
Clone the repository:
git clone https://git.freecumextremist.com/NotSam/fediverse-imagebot.git
-
Install dependencies:
yarn --production
-
Build:
yarn build
-
Run the bot:
yarn local
You're done! The bot should post a local image to the fediverse instance of your choosing!
Running the bot
-
Obtain a token. I have another tool that does this for you, which can be found here and put it in
config.json
, following the sample json file. -
Put images in the
images
folder.
- By default the bot will look for SFW images at
images/sfw
and NSFW images atimages/nsfw
. This can be configured with the-d
flag.
Automating the bot
TODO: Elaborate more
The bot can be automated to post images at set times using a cronjob.
Example cron configuration:
0 * * * * cd /path/to/fediverse-imagebot && /usr/local/bin/yarn local -m "Message"
This example will run the bot every hour on the hour with the post message Message
using images from the default images
directory.
An example of this pleroma configuration can be found at https://froth.zone/rinbot.