Jump to content

Search file system per ssh and continue with IMDb search


Recommended Posts

I am just making the switch from LaunchBar and try to get all my routines to work within Alfred...

 

In LaunchBar, I created an "Action", that takes text (a movie name) as input, feeds it to an Applescript that issues a ls (list directory) command per ssh on my file server in the movies directory. If (a) movie(s) beginning with the text is/are found, it displays the result(s) in large typed text and quits. If no movie of that name is found, it issues an IMDb search for the text.

 

What would be the best way to accomplish that with an Alfred workflow?! Is it possible to let the output of the ls command be displayed in Alfred or have it large typed? How to implement the conditional?!

 

Thanks for your help!

 

J.

Link to comment

I am just making the switch from LaunchBar and try to get all my routines to work within Alfred...

 

In LaunchBar, I created an "Action", that takes text (a movie name) as input, feeds it to an Applescript that issues a ls (list directory) command per ssh on my file server in the movies directory. If (a) movie(s) beginning with the text is/are found, it displays the result(s) in large typed text and quits. If no movie of that name is found, it issues an IMDb search for the text.

 

What would be the best way to accomplish that with an Alfred workflow?! Is it possible to let the output of the ls command be displayed in Alfred or have it large typed? How to implement the conditional?!

 

Thanks for your help!

 

J.

 

It should definitely be possible. You could use one of the libraries available here to assist you in generating the results as feedback. There are libraries for several languages available. These libraries would only be useful if you are wanting to show the results in the main Alfred interface as actionable results though. Results are generated via XML, see documentation of the XML format here

 

You would probably reuse a lot of the code you have already. You could create a workflow using the Keyword to Script template and insert your code in the Script item. Just add a check at the end of it to determine what the output of the 'ls' was and then from that, you could add an "open <url>" to the end of the script. There are several other ways to do this as well.

Link to comment

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...