I am kind of amazed that @rt doesn't have, like, 9000 followers.
@grumpy @rt Sometimes it veers into drama posts but it is a really good account to follow.
@p @rt yeah, i just followed.

there seems to be a lot of cool bots like this on fedi but they're hard to find (at least for me). years ago i found one that retweets random posts from low follower accounts. i wanted to follow it again but couldn't find it
@grumpy @rt Oh, there was the one by Nichy that used to repost low-volume accounts. That was a cool idea, but I think he's not running it any more.
@p @rt that's a shame. maybe another will turn up eventually
@grumpy @rt You could make one. Just periodically scan your TWKN, update a timestamp for each post you see, if the difference between the current timestamp and the previous timestamp is over 3 standard deviations from the average, have the bot repost it. I think you could fit the bot in about a page of code.
@p @rt yeah i'm gonna be honest with you p i have no idea how the hell to do that but i'll try and figure it out once i'm done fiddling with everything else i promised myself i'd fiddle with
@grumpy @rt It's easy! There's some fiddly stuff to fill in, but off the top of my head:

def avg_stddev a
avg = a.sum.to_f/a.size
stddev = Math.sqrt(a.map { |i| (i-avg)*(i-avg) }.sum/a.size)
[avg, stddev]
end

# You could do this with sqlite3 or whatever.
timestamps_file = '/wherever/you/wanna/put/it/timestamps.yaml'
timestamps = if File.exist?(timestamps_file)
YAML.parse(File.read(timestamps_file))
else
{}
end

now = Time.now # We wanna freeze "now" so it doesn't skew as time advances.

avg, stddev = if timestamps.any?
avg_stddev timestamps.values.map { |t| now - t }
else
[0, 0]
end

# 99.7% of the posts will be within average±3*stddev:
# https://en.wikipedia.org/wiki/68%E2%80%9395%E2%80%9399.7_rule
# Anything higher than that will be the top 0.15% of whatever metric,
# and lower will be in the bottom 0.15%, assuming a normal distribution.
# For post frequency, we can assume that.
threshold = avg + (stddev * 3)

hostname = 'your-hostname-here.biz'
posts = `curl -s https://#{hostname}/api/v1/timelines/public?local=false`
repost_queue = []
JSON.parse(posts.reverse).each { |post|
account = post['account']['acct']
if timestamps.has_key? account
next if post['account']['note'].include?('#nobot') # Be polite
if (now - timestamps[account]) > threshold
reposts << post
end
end
timestamps[account] = now
}
File.write(timestamps_file, timestamps.to_yaml)

reposts.each { |post|
# I forget the endpoint you hit to repost, but do that here.
# You'll need post['id'], that's how your server identifies the post.
# (Unfortunately, Pleroma expects you to construct the URL.)
# Maybe it's something like POST /api/v1/notes/$id
}
@p @rt I'll get back to you whenever i decide to do it but ive copy/pasted it all somewhere safe

running my instance has been very slowly but very surely teaching me about this stuff and its equally fun, rage-inducing, and interesting

"i sure wish i could change what that text on that page says with the admin fe" quickly turns into me figuring out what the fuck a "private key" is and then i start learning a bunch of shit about linux and by the time im done i didn't do what i wanted to but i learned a lot for next time.
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.