Chris Messina Posted November 29, 2021 Share Posted November 29, 2021 Like @andy4222, I'm a big fan of TextBuddy. I would like to be able to select some text, invoke Alfred's Universal Actions, then choose from the menu of available options supported by TextBuddy. More details: like many apps, TextBuddy has its own simply command palette: I've been in touch w/ the developer and we're interested in hooking up Alfred Universal Actions to these actions (e.g. having TextBuddy do the processing, possibly headlessly). @dfay's CaseConverter Workflow offers Text Actions: ...which implies that a TextBuddy Workflow would need to enumerate all of its Text Actions in order for Alfred to list them: — but I'm presuming that there might be a way for TextBuddy to generate a JSON List Filter or something like that would automate and keep-up-to-date that list of commands as they evolve in each app update. My question is really to support Tyler building a deeper integration with Alfred. Are there tips or best practices for app devs to advertise their services to Alfred's UA engine? Thanks! andy4222 1 Link to comment
andy4222 Posted November 30, 2021 Share Posted November 30, 2021 (edited) @Chris Messina Thanks for posting this. If Alfred team can steer this somewhere, that would be super slick!! Either way, I was trying to integrate Alfred with TextBuddy. I have built this workflow with direction/help from @deanishe. It works with Alfred, not exactly like we want, but really close. It has two options: - When we trigger Alfred UA, it shows TextBuddy option, and Enter-ing it would launch TextBuddy's command palette. I know this does require us to first launch Alfred's UA, hit Enter on TextBuddy option, then search for the action inside TextBuddy, so its one extra Enter, rather than TextBuddy's actions showing up in UA, but still really close. (See screens below) - In the second option, I basically hooked this directly with a keyboard shortcut (Option + T) for Process with TextBuddy and (Option + S), for Send with TextBuddy. So when you select a text and hit that key combo, it launches TextBuddy's command palette, which is actually less key strokes even if TextBuddy's option showed up in Alfred's UA. I'm using this all the time since it saves a few keystrokes and does exactly what I want. The best part about this is that it works for all apps, even the ones which don't support Mac Services, e.g. Obsidian. If you select text in Obsidian, and launch this workflow, it does exactly what we want, even though Obsidian doesn't even have a Services menu. Same goes for all other apps. Credits to @vitor for sharing @deanishe workflow, I re-used & modified that workflow to build this. Workflow: https://www.dropbox.com/s/l8xf8zat7cjhrj3/Text Transformer - TextBuddy.alfredworkflow?dl=0 Edited November 30, 2021 by andy4222 Link to comment
deanishe Posted November 30, 2021 Share Posted November 30, 2021 10 hours ago, Chris Messina said: I'm presuming that there might be a way for TextBuddy to generate a JSON List Filter or something like that would automate and keep-up-to-date that list of commands as they evolve in each app update. It could create a workflow programmatically that contains a Universal Action for each of its transformations. That's how Dash's Alfred integration works. When you update your Dash configuration, it regenerates the workflow. Chris Messina 1 Link to comment
andy4222 Posted November 30, 2021 Share Posted November 30, 2021 @deanishe Can you please direct us to any docs and examples of how to programmatically create a workflows with UA? Link to comment
deanishe Posted November 30, 2021 Share Posted November 30, 2021 11 minutes ago, andy4222 said: @deanishe Can you please direct us to any docs and examples of how to programmatically create a workflows with UA? No docs, AFAIK. It's simple enough to figure out from looking at the info.plist. Link to comment
Chris Messina Posted December 1, 2021 Author Share Posted December 1, 2021 15 hours ago, andy4222 said: @deanishe Can you please direct us to any docs and examples of how to programmatically create a workflows with UA? If you check out Dash's workflow, it cleverly uses callbacks, and otherwise dynamically generates the plists for the Script Filters. open -g "dash-workflow-callback://{query}" It does seem like this could be a good model to emulate! Link to comment
Ted Curran Posted April 14, 2022 Share Posted April 14, 2022 @andy4222 It appears your dropbox link has been deleted -- what is the status of this workflow at the moment? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now