Jump to content

alfredextension and Alfred v2


Recommended Posts

Is there any way to use alfredextension files in v2? Can they be converted into workflows?

 

There isn't a way to just click a button and convert them but alfredextensions can typically be converted rather easily. Most were just shell scripts that you could copy and paste the code from the extension into a "Keyword to Script" workflow template and have most of the work done.

Link to comment

There isn't a way to just click a button and convert them but alfredextensions can typically be converted rather easily. Most were just shell scripts that you could copy and paste the code from the extension into a "Keyword to Script" workflow template and have most of the work done.

So if you have a someaction.alfredextension

What do you open the .alfredextension with to copy from ?

Do you have to have a copy of Alfred v1 to do this?

Link to comment

@David

Ok so I tried renaming the someaction.alfredextension to someaction.alfredextension.zip

Extracted it and get a couple of .plist

 

If I open in PlistEdit Pro I can see a bunch of <keys>

and of course some terminal commands and some applescript.

 

Surely converting a v1 alfredextension to a v2 workflow could be automated a little?

Edited by rootscript
Link to comment

It really is not worth it or I think David would have already done it. Alfred 2 is much more complex, although workflows have .plist files still to hold setting information there is not much more in common in the way of similar keys being used etc...  Much easier to just go in and make a v2 workflow.

 

Also, no need to rename file to .zip - .alfredextension is already a zip file so just unzip that file without renaming. The plist's that you get tell you what you need to do...

 

Should be familiar just looking at the command what needs to be added, i.e. bash script or applescript but if not look at <key>category</key> - SCRIPTS value means you just create a bash script for that command. Also just follow the info.plist info to get your settings in order for the escaping options. True means leave it checked and false means don't.

 

Tip of advice. I think it is great there is no conversion/automation of v1 to v2 as I got rid of a lot of extensions I don't really need. Don't do conversion en masse - Use alfred as you would normally, see what scripts you are using often and add them in. One more thing, if you already have Alfred v1 installed, and those v1 extensions installed you can just go to your ~/Library/Application Support/Alfred/extensions/ folder to see all the workflows i.e. all info.plist files w/o needing to unzip. Already organized by type so that might make it easier and they are named conventionally as you remember.

 

Hope that helps, I know it's not much info or a script to convert, but as someone who had WAY more scripts than they needed on v1 I thought it would be terrible to do it by hand but it worked out for the best as I cleaned out my unused items and the easy to interpret labeling on v1's .plist files made configuration easy.

Link to comment

@twinpeaks

I can see where you are coming from. I started using Alfred at v2, so I keep finding links to "Great" Alfred extensions; that are useless to me.

At least now with a little effort & some advice from you I can at least extract any applescripts, and switch settings etc...

 

After reading your reply, I think a better utility would be an Alfred (shell script / applescript) extractor.  Even that isn't really needed, maybe all thats really needed is a little post explaining how.

Edited by rootscript
Link to comment
  • 3 weeks later...

Looking for guidance in converting Brett Terpstra's QuickQuestion Alfred 1 extensions to workflows?  http://brettterpstra.com/projects/quickquestion/  I have extracted the plist fies from the Alfred extensions but unsure where to go from there.  Thanks in advance for any assistance.

 

If you look in the plist, there will be a key/value that contains the script that was executed for that extension. Create a new workflow, copy any supporting files that the extension used (if any) to the new workflow's directory. Add a keyword (input), and a run script (action) to the new workflow. Setup your keyword appropriately, then paste the script content from the extension into the run script item. Connect the keyword and run script, and test it out.

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