Jump to content

Workflow Scripts created in new files


kbrock

Recommended Posts

When I create workflows, I use scripts as their own file to make testing and version control work better. (try resolving a git conflict in a workflow script)

 

Unfortunately, that means viewing my workflow in the UI no longer lets me see the scripts and edit them.

Is it possible to view the contents of an external file script in the ui?

Or have an external script option?

 

my scripts are in bash and read:

 

# all args are coming in as $1 (so passing in $@ instead of "$@")
/usr/bin/ruby --disable-gems ./blue_url.rb $@

 

I would have rather just created the script in alfred but had it in a separate file.

Or require me to create my own file and have script file section

Or so many other possibilities.

 

Thanks again for the great magic that makes my life better

 

 

Link to comment
Share on other sites

On 11/7/2022 at 10:13 PM, kbrock said:

Or have an external script option?


It’s in the Language dropdown in Run Scripts and Script Filters.

 

On 11/7/2022 at 10:13 PM, kbrock said:
# all args are coming in as $1 (so passing in $@ instead of "$@")


There’s no reason to not pass $1 instead. But you’re relying on the shell’s implicit splitting. There’s probably a better way to do it but can’t say without knowing the script.

 

On 11/7/2022 at 10:13 PM, kbrock said:
/usr/bin/ruby


By using the full path, you’re setting up to needing to update when Apple removes it. Ruby doesn’t tend to break older versions; using just ruby should help with future-proofing.

 

On 11/7/2022 at 11:28 PM, dfay said:

with the content of its directory


When editing an object, there is an icon on the bottom left which reveals the contents in the Finder.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...