Sam Therapy
cf9e21ac56
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Sam Therapy <sam@samtherapy.net> |
||
---|---|---|
src | ||
.drone.yml | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
.prettierignore | ||
config.sample.jsonc | ||
LICENSE | ||
package.json | ||
pnpm-lock.yaml | ||
README.md | ||
renovate.json | ||
tsconfig.json |
fediverse-imagebot
A bot that posts local and booru images to the Fediverse.
Compatible with Mastodon, Misskey and Pleroma!
MIGRATING MAJOR VERSIONS
See the wiki.
Boorus supported
The full list of boorus supported is found here.
Downloading the bot
There are currently two ways to do this, either with a pre-built binary or building from source. Both are listed below.
Downloading pre-built binaries
Download prebuilt binaries from here. (currently supports x86_64 and arm64 on Linux [glibc or musl], macOS and Windows)
-
Run the bot with the
-w
flag to have it generate a configuration file to the local directory. -
Edit it for your use case.
- If you want to generate a key you can use https://git.froth.zone/sam/js-feditoken
- Run the bot by launching the executable!
Running from Source
- You need to have
npm
andnodejs
installed.- Node 16 or greater is required.
- Install
pnpm
:
corepack enable
Check https://pnpm.io/installation for more information. - Clone the repository:
git clone https://git.froth.zone/sam/fediverse-imagebot.git
- Install dependencies:
pnpm i
- Build:
pnpm build
- Edit the config file:
cp config.sample.jsonc config.jsonc
- If you want to generate a key you can use https://git.froth.zone/sam/js-feditoken
- Run the bot:
yarn bot
You're done! The bot should post a local image to the fediverse instance of your choosing!
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 bot -c ./config.sample.jsonc
This example will run the bot every hour on the hour with no message using images from the default images
directory.
An example of this pleroma configuration can be found at https://froth.zone/rinbot.