Jump to content
bevesce

Script runner - add scripts to list and run them.

Recommended Posts


 

I noticed that I repeatedly write some script, wire it with some keyword or hotkey in Alfred and then forget what it was.

 

So I created quick workflow that allows you to add scripts to list with **add script** file action and then display and run them with **./** keyword. First word of query is used to filter scripts, you can pass command line arguments after space.

 

scriptrunner.png

 

At the moment workflow supports python, perl, osascritpt and ruby but new languages can be easily added by adding extension and name of interpreter to extension_interpreter dictionary in scriptsrunner.py.   

 

 

 

I really should stop doing those workflows...

Share this post


Link to post

That's nice.

I used to store all scripts in the scripts folder (to be avaiable in the script menu Bar).

Is there a way the workflow directly search and list in this folder instead of having to add script manually?

Thanks.

Share this post


Link to post

That's nice.

I used to store all scripts in the scripts folder (to be avaiable in the script menu Bar).

Is there a way the workflow directly search and list in this folder instead of having to add script manually?

Thanks.

 

Simple alfreds file search won't work because it wouldn't be possible to pass arguments to scripts.

I opted for adding individual scripts manually as more flexible way, I don't need to add whole

folders of them but maybe I'll implement it when I'll have some free time.

Share this post


Link to post

So ok,

new commit supports adding whole folders of scripts to workflow in the same way as text files.

 

Folder itself is displayed on the list - to allow removal.

It's not feature used by me so I would appreciate eventual bug reports.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...