More generic actions (hardcoded "upload to imgur" vs "upload to [somewhere]")

Hey Andreas!

A recent changelog entry ("add an action to upload to" (paraphrased)) got me thinking.

From one coder to another: you're gonna be writing "add an action to blah to blah2" a lot if you plan to do more "upload to xyz" one-offs :wink:

My suggestion? Instead of one-offs like this, see if you can implement some sort of add-on + add-on repo (first-party and maybe community versions?) where add-ons implement these? It wouldn't even have to support scripts (bash or otherwise (python? groovy?)) if there was some other way of working things (predefined steps like in jenkins? "httpGet", "httpPost", "writeTextToFile", etc).

Plus, what happens if imgur goes away? Wasn't it recently bought by a private equity firm? MediaLab something or other? I'm not saying it will go away, but the list of companies bought by private equity and still around in a substantially original form is a rather short list.

In general I agree, but on the other hand users use these predefined actions a lot and probably wouldn't care for them if they were moved to some extra plugin repository.

The IMGUR action was just extracted from the BTT screenshot tool, thus it was a quick win to make it available as an action as well. It would also not be trivial to include into a plugin because it needs OAuth authentication with callbacks. (All doable, but I think at the moment not really worth the effort).

A lot of this can be solved by using the new Shortcuts app on Monterey, which works great with BTT. That's kind of like an action plugin repository for BTT:

You can write plugins for BTT in Swift or Objective-C already, but that's a pretty niche thing at the moment:

[...] write plugins for BTT [...] already [...] BetterTouchToolPlugins

Note to freaking self! I had no idea that plugins were already a thing!

the Shortcuts app sounds like the best possible version of the subject of this thread, so /thread :wink:

oauth [...] hooks

oof, yeah, been there and done that. Trying to hook a plugin's oauth into a webapp was frustrating enough, and that was when there was an online web server to handle the dance! (That said, I suspect not having a web side would make it easier, since you wouldn't have to figure out how to hook the auth flow into the server).