Tweet This Post

The latest update to Launch Center Pro has made it easier to create nested lists. Previously one had to use launch://?url= but now that is no longer necessary. Here is an abridged version of my LCP action to open albums in Ecoute:

ecoute://play?terms=[[list:Artist|Eminem=[list:Album|Marshall Mathers|Recovery]|Foo Fighters=[list:Albums|The Colour and the Shape|There Is Nothing Left to Lose]|Pharrell Williams={{Pharrell Williams}}|Search=[prompt:Search]]]

When I tap on this action, it presents a list of artists (Eminem, Foo Fighters, Pharrell Williams, and "Search"). If I tap on either of the first two, I am presented with a list of albums, and when I tap on the album name, that album auto-plays in Ecoute. If I tap on Pharrell Williams, G I R L automatically plays because I only have one album by him in my library. And if I tap on Search I am presented with a prompt, and if my query matches something in my music library, then it starts playing. (Thanks to Eric Pramono @epramono for help encoding this last part.)

The key to this nested list is that the first list is surrounded by double brackets and the embedded lists are only surrounded by single brackets. Two brackets means don't encode this. Because the first list is not encoded, I have to encode Pharrell Williams in double curly brackets since his name does not included an embedded list. And the search prompt only needs single brackets because they encode the prompt text.

The Spotify URL scheme is a bit more complicated. Here is an abridged version of my Spotify action:

spotify:[[list:Pick a List|Ali Farka Touré={{http://open.spotify.com/artist/3mNygoyrEKLgo6sx0MzwOL}}|King's X=[list:|Xv=http://open.spotify.com/album/792TsZibmmEiOCL2rEoJvm|Please Come Home....Mr. Bulbous=http://open.spotify.com/album/2ZyMISUxP7MLzxZCZLHEHJ]|Yes=[list:|Fragile=http://open.spotify.com/album/4X6gq5bgpGXcHINlFWzriM|Relayer=http://open.spotify.com/album/6MK9yp7hFeOLeR7F1hsBp6]]]

When I click on this action I would be presented with Ali Farka Touré, King's X, and Yes. Following the pattern above, if I don't have an embedded list for an artist, I just encode that value with double curly brackets. Otherwise I just use single brackets around the embedded list.

The URL scheme for Spotify is spotify:SPOTIFY_URL. You can get the Spotify URL from the app (in the share settings) or via a google search. I've even written a search tool using their API here.

How to Manage These Actions

One of the major downsides of LCP is that it's difficult to edit very long actions in the app's editor. However, there is a way around this. Import this action or just create a new action called Import and enter this string:

launch://import?url=[dropbox-text:ACTION.txt]

Then keep your music actions in their own text files in Dropbox. For example, I currently have my unabridged Spotify action as a text file called spotify.txt in the root of my Dropbox folder. I then just use the following action to import it:

 launch://import?url=[dropbox-text:spotify.txt]

LCP will import that text file, and ask you if you want to add it, just like if you were to use one of the importable actions at launchcenterpro.com. This way, you can make your edits in any Dropbox text editor instead of within the app itself.

06/16/14; 11:57:07 AM

Tweet This Post

Tweetbot has a list of URL schemes, the most recent of which is one to jump immediately to a Twitter list. I have never used it until now because I never knew how to find a list's ID. But now that I've figured it out, I'd like to share it with you.

The full scheme is

tweetbot://<screenname>/list/<list_id>?callback_url=<url> 

but you don't need to include the ? parameter unless you want to go somewhere other than your most recent timeline view in the app.

Let's say I want to view my ios Twitter list. To get the list ID, I view the source of the web page and search for data-list-id. In this example, the source code includes data-list-id="79393622". I take that value and put it in the URL scheme:

tweetbot://kishner/list/79393622

If I include this as an action in Launch Center Pro, then clicking on it will bring me right to that list.

If I have a preferred app I want to go to after I click the Cancel button, I can include the callback_url parameter, which is an encoded URL. If I want to go to Launch Center Pro:

tweetbot://kishner/list/79393622?callback_url=launch://

If I want to go to an actual website like google.com instead:

tweetbot://kishner/list/79393622?callback_url=http%3A%2F%2Fgoogle.com

Enjoy!

06/16/14; 09:21:52 AM

Last built: Mon, Jun 16, 2014 at 12:05 PM

By Jeffrey Kishner, Monday, June 16, 2014 at 9:21 AM.