There are a few toots which I feel need to be re-boosted from time to time, because just boosting them once is not enough.
-
Gergely Nagy πreplied to Gergely Nagy π last edited by
I'm failing to find a tool that could do this, so I guess I'll be writing one. In Rust, because while I could write it in shell with a bit of curling, I really don't want to.
So now I'll have to decide whether to use something like the
megalodon
crate to do the authentication & boosting (and perhaps some auxilliary tasks like finding the local id of a toot, based on its original url), or just implement the necessary API requests by hand?The advantage of using
megalodon
would be that it'd support servers with a different API than Mastodon's (firefish only, by the looks of it). The disadvantage is a (heavier) dependency.Though, looking at the megalodon deps, I would be using similar dependencies myself anyway, perhaps slightly less.
-
Gergely Nagy πreplied to Gergely Nagy π last edited by
I suppose some additional context is necessary: I am building this tool for myself. I only care that it works with Mastodon and GoToSocial, because I have no plans to use anything else, so supporting Friendica, Pleroma and Firefish in addition is not something I have any interest in.
As far as this tool is concerned, it will be hitting a total of three API endpoints:
/api/v1/accounts/verify_credentials
,/api/v2/search
, and/api/v1/statuses/{id}/reblog
. All three of these are trivial to implement by hand.Most of the complexity will be in the scheduling parts.
-
@algernon I feel like you should just hit the endpoints instead if itβs that trivial on the API side tbh>_>
-
Gergely Nagy πreplied to Gergely Nagy π last edited by
Hrm... one thing I'm unsure about: can I figure out when I retooted a status, via the API? Or is that something I'll have to keep track of, and use some kind of database?
-
-
jackson (in agony)replied to Gergely Nagy π last edited by
@algernon hmmm, i see https://docs.joinmastodon.org/entities/Status/#reblogged (info you can try to get via https://docs.joinmastodon.org/methods/statuses/#get, should also be available via the search endpoint)
-
Gergely Nagy πreplied to jackson (in agony) last edited by
@jacksonchen666 Yeah, that tells me that I boosted it, but it doesn't tell me when, unfortunately.
I can find the status of my boost in the db, and retrieving that status gives me the date of the boost... but... how do I find the id of my boost via the API? If that is even possible.
-
Gergely Nagy πreplied to Gergely Nagy π last edited by [email protected]
Hah!
I can avoid a database! I just need to crawl
/api/v1/accounts/{id}/statuses
, and find the last boost of the statuses I want to periodically reboost. I can do that once at startup, and then keep the internal cache updated while the program's running.No need for a database, at the cost of some crawling at startup. I can live with that.
-
Gergely Nagy πreplied to Gergely Nagy π last edited by
Hmm... I wonder if GoToSocial has an API that could make this easier... I wouldn't mind supporting GTS only, since I'm planning to migrate anyway.
-
Gergely Nagy πreplied to Gergely Nagy π last edited by
Right, so there's a plan, and I will build it! But now comes the next hardest part of a software project: naming.
Help me, Fediverse! How should I call this little tool, that takes a list of toots, and periodically retoots them on my behalf?
Lets have a quick poll.
-
@algernon Since you'll be doing this in an instance you manage yourself, maybe it's easier to get it from the mastodon/gotosocial database directly instead of crawling the API?
-
@erethon Yes and no. If I ran the tool on the server side, then maaaybe (though I'd then have the added complexity of talking to the database - thus, additional dependencies). But I want to run it on my desktop, and accessing the database from there is non-trivial.
Crawling the API takes a few seconds, and implementing it is just a handful of lines of code, so querying the DB wouldn't have much benefit in this case.
(On top of this, I don't like digging in the database, and doing so would be even more software specific than the API, so I'd have to build a Mastodon variant, and then a GoToSocial one when I migrate over)
-
@algernon hm...
GNU Toots?
https://xclacksoverhead.org/home/about -
@Filene Oooh, that's a good one! Unfortunately, GNU, in a software context, is usually interpreted differently, and I'd like to avoid even accidental association with that project.
But something along those lines might work! I'll have a think about it, thanks!
-
Kevin Rigglereplied to Gergely Nagy π last edited by
@algernon Fedica does this. (fedica.com)
-
Gergely Nagy πreplied to Kevin Riggle last edited by
@kevinriggle Looks like a proprietary AI-infested thing. I'll pass.
-
Gergely Nagy πreplied to Gergely Nagy π last edited by
I built a tool to periodically retoot selected toots. It's very bare-bones at the moment, and has some (as of now undocumented) limitations, but it more or less works.
You can check belated-retooter out on my forge.
-
Kevin P. Flemingreplied to Gergely Nagy π last edited by
@algernon Does it include some sort of hashtag so I can filter the retooted toots out?
-
Gergely Nagy πreplied to Kevin P. Fleming last edited by
@kevin No, because it's boosting, and I can't add hashtags there. The only way to hide its output is to hide boosts from me, but that hides every boost, not just the tools.
(FWIW, the tool will be configured to boost at most a handful of things at most once a month, a few days apart. I've been boosting those same toots by hand at similar intervals anyway, so there won't be any perceptible difference.)
-
Lars Wirzeniusreplied to Gergely Nagy π last edited by
@algernon Docs should probably say an instance of what the program connects to.