custom action update framework

Sharing and discussing custom actions for LaunchBar
Post Reply
prenagha
Rank 3
Rank 3
Posts: 87
Joined: Mon Nov 05, 2012 4:10 pm

custom action update framework

Post by prenagha » Sat Sep 12, 2015 6:23 am

working out a general LaunchBar action updater framework.
please review and comment on github issue #1 thread if you are action developer

https://github.com/prenagha/launchbar/issues/1

http://prenagha.github.io/launchbar/updates.html

Image

prenagha
Rank 3
Rank 3
Posts: 87
Joined: Mon Nov 05, 2012 4:10 pm

Re: custom action update framework

Post by prenagha » Tue Sep 15, 2015 2:21 am

It has now been released. Enjoy.

http://prenagha.github.io/launchbar/updates.html

raguay
Rank 1
Rank 1
Posts: 33
Joined: Fri Jul 18, 2014 11:08 am

Re: custom action update framework

Post by raguay » Tue Sep 15, 2015 3:03 pm

This action always dies on me with an alert box saying "An error occurredwhile running "Action Updates" TypeError: undefined is not a function (evaluating 'actinPackage.endsWith(".lbaction")') (line 93)."

prenagha
Rank 3
Rank 3
Posts: 87
Joined: Mon Nov 05, 2012 4:10 pm

Re: custom action update framework

Post by prenagha » Tue Sep 15, 2015 3:05 pm

Someone else had that happen. I can't recreate it.

1) can you grab the action's output from console and copy it here

2) is your actions directory the normal ~/Library/Application Support/LaunchBar/Actions?
or anything unusual like soft link?

raguay
Rank 1
Rank 1
Posts: 33
Joined: Fri Jul 18, 2014 11:08 am

Re: custom action update framework

Post by raguay » Tue Sep 15, 2015 3:15 pm

I can not find anything in the console program that would of come from Launchbar or a script. The action is in the normal directory. No funny stuff.

prenagha
Rank 3
Rank 3
Posts: 87
Joined: Mon Nov 05, 2012 4:10 pm

Re: custom action update framework

Post by prenagha » Tue Sep 15, 2015 3:20 pm

download latest from https://prenagha.github.io/launchbar/updates.html and install. should be version 2.2.

run the action

go into console, select "All Messages" from list on left, type "com.renaghan.launchbar.Updates" in search box on top

prenagha
Rank 3
Rank 3
Posts: 87
Joined: Mon Nov 05, 2012 4:10 pm

Re: custom action update framework

Post by prenagha » Tue Sep 15, 2015 4:17 pm

in v2.2 i removed startsWith and endsWith methods. Seems like those aren't universally supported in javascript so that may be the problem. Please download latest and retry.

raguay
Rank 1
Rank 1
Posts: 33
Joined: Fri Jul 18, 2014 11:08 am

Re: custom action update framework

Post by raguay » Wed Sep 16, 2015 3:36 am

That one works for me. But, I figure all copies of Launchbar would use the same JavaScript engine. Why would some have functions and other not? That sounds like a problem area of inconsistency to me.

prenagha
Rank 3
Rank 3
Posts: 87
Joined: Mon Nov 05, 2012 4:10 pm

Re: custom action update framework

Post by prenagha » Wed Sep 16, 2015 3:44 am

LB probably uses the Mac OS system javascript engine. I am running El-Capitan beta which I suspect has added methods that other versions may not have.

veke71
Rank 2
Rank 2
Posts: 62
Joined: Sun Jul 03, 2011 10:14 pm

Re: custom action update framework

Post by veke71 » Wed Sep 16, 2015 2:11 pm

Very nice, thanks!

raguay
Rank 1
Rank 1
Posts: 33
Joined: Fri Jul 18, 2014 11:08 am

Re: custom action update framework

Post by raguay » Fri Sep 18, 2015 3:46 pm

I updated my last action, but the update command still says it is not supported. How do you flush the cache and have it re-check the actions?

prenagha
Rank 3
Rank 3
Posts: 87
Joined: Mon Nov 05, 2012 4:10 pm

Re: custom action update framework

Post by prenagha » Fri Sep 18, 2015 3:57 pm

The action you have installed locally on your Mac needs to be a version of the action that has the LBUpdateURL plist key. That may require you to manually install it. From then on the action update can take care of it.

raguay
Rank 1
Rank 1
Posts: 33
Joined: Fri Jul 18, 2014 11:08 am

Re: custom action update framework

Post by raguay » Sat Sep 19, 2015 10:50 am

Now, it says it's the wrong format. You can see it here: https://raw.githubusercontent.com/ragua ... Info.plist

What is wrong?

prenagha
Rank 3
Rank 3
Posts: 87
Joined: Mon Nov 05, 2012 4:10 pm

Re: custom action update framework

Post by prenagha » Sat Sep 19, 2015 5:54 pm

Did you try having <string> element on its own line like the others?
Not sure if that is a problem or not, but notice that is different than everything else
What console logging does my action report?

raguay
Rank 1
Rank 1
Posts: 33
Joined: Fri Jul 18, 2014 11:08 am

Re: custom action update framework

Post by raguay » Tue Sep 22, 2015 4:37 am

sorry, I found the problem. The <string> key had an extra carriage return. Not sure why that would cause a problem, but the workflow seems to be sensitive to exact formatting. When I have time, I will up my other actions to use this as well. Thanks.

Post Reply