Moon, 5 months ago maybe I'll ad a bot @wokenews and every post will be [noun] has gone woke.
maybe I'll ad a bot @wokenews and every post will be [noun] has gone woke.
raccoon, 5 months ago @Moon @wokenews Speaking of bots, is it hard to make one? I'd like to make a bot that posts raccoon pictures.
@Moon @wokenews Speaking of bots, is it hard to make one? I'd like to make a bot that posts raccoon pictures.
Moon, 5 months ago @raccoon you need programming ability so probably yes.
@raccoon you need programming ability so probably yes.
raccoon, 5 months ago @Moon Oh well! Maybe in the future if I ever learn. (Let's be realistic, never :P)
@Moon Oh well! Maybe in the future if I ever learn. (Let's be realistic, never :P)
Moon, 5 months ago @raccoon do you just want a bot that publishes pictures from a folder? because I think there's a bot that already exists for that that you could use with no proramming ability.
@raccoon do you just want a bot that publishes pictures from a folder? because I think there's a bot that already exists for that that you could use with no proramming ability.
raccoon, 5 months ago @Moon It would take some time to build the folder but it would definitely be easier I reckon. So it might work.
@Moon It would take some time to build the folder but it would definitely be easier I reckon. So it might work.
Moon, 5 months ago @raccoon askfedi about it, I don't know what the script is called but there are multiple ones
@raccoon askfedi about it, I don't know what the script is called but there are multiple ones
graf, 5 months ago @Moon @raccoon easy couple liner in python utilizing the mastodon.py library script.py: !/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
@Moon @raccoon easy couple liner in python utilizing the mastodon.py library
script.py:
!/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
chmod a+x script.py
this will require that you have a library of images tho not pulling them directly
Ukko, 5 months ago @Moon moon has gone woke
@Moon moon has gone woke
why, 5 months ago @Ukko @Moon this happened back in like 2019 when he transitioned from moonman
@Ukko @Moon this happened back in like 2019 when he transitioned from moonman
Add comment