@Moon @raccoon easy couple liner in python utilizing the mastodon.py library
!/usr/bin/env python3 import os import sys import toml from mastodon import Mastodon basepath = os.path.dirname(os.path.abspath(__file__)) settings = toml.load(os.path.join(basepath,'settings.toml')) mastodon = Mastodon( access_token = os.path.join(basepath,'usercred.secret'), api_base_url = settings.get("mastodon_url") ) media = mastodon.media_post("image.png") mastodon.status_post("", None, media_ids=[media], sensitive=False, visibility='public')settings.toml:
mastodon_url="" mastodon_user=""usercred.secret is just your bot's token generated from https://tools.splat.soy/pleroma-access-token/
then you can just chmod a+x script.py and run ./script.py $filename
this will require that you have a library of images tho not pulling them directly