Jump to content

Navigate web results similar to folder navigation


Recommended Posts

I'm trying to write a workflow for interacting with Trello. Based on the way the Trello API is (https://trello.com/docs/) I need to rely on IDs for the different sets of data. I was thinking of using key modifiers but I'm pretty sure that wont work.

 

What I have in my head:

 

tlo -> display all your boards -> select a board and the ID is passed to display the lists for that board-> selecting a list grabs the ID and displays the cards

 

I may be trying to simplify this down a lot when in fact it needs to be more. I'm just drawing a blank on conceptualizing the workflow.

Link to comment

I'm trying to write a workflow for interacting with Trello. Based on the way the Trello API is (https://trello.com/docs/) I need to rely on IDs for the different sets of data. I was thinking of using key modifiers but I'm pretty sure that wont work.

 

What I have in my head:

 

tlo -> display all your boards -> select a board and the ID is passed to display the lists for that board-> selecting a list grabs the ID and displays the cards

 

I may be trying to simplify this down a lot when in fact it needs to be more. I'm just drawing a blank on conceptualizing the workflow.

 

Stuff like this is a lot easier done with External Triggers now days.

 

For instance... you have a keyword that goes to an external trigger. That triggers ties to a script filter that shows the list of all boards. Selecting that passes data to run script that, based on what you select, hits another external trigger to another script filter. This time to show the lists for that board or.. if you hit a previous link at some point, go to the previous external trigger. That would be my recommendation

Link to comment

I'm trying to write a workflow for interacting with Trello. Based on the way the Trello API is (https://trello.com/docs/) I need to rely on IDs for the different sets of data. I was thinking of using key modifiers but I'm pretty sure that wont work.

 

What I have in my head:

 

tlo -> display all your boards -> select a board and the ID is passed to display the lists for that board-> selecting a list grabs the ID and displays the cards

 

I may be trying to simplify this down a lot when in fact it needs to be more. I'm just drawing a blank on conceptualizing the workflow.

 

I'm not a big fan of the external triggers method, as I prefer to keep as much of the complexity as possible in my code, where I can comment it, and out of Alfred's UI where it can be difficult to maintain an overview of which element does what (it's not possible to show a connection between a run script action and the external trigger it calls, for example). It's also a lot easier to refactor a workflow in a code editor than in Alfred's UI.

 

What I'd do in this situation is to create a "multi-level" query using a delimiter, e.g. , and show results according to the query.

 

Thus, tlo would show a list of all boards. Hitting ENTER or TAB on a board would autocomplete the query to 'tlo board name 〉 ' (note the trailing space—it's important), and your script filter would then show a list of that board's lists. 'tlo board name 〉 blah' would filter the board's lists on blah. Hitting ENTER or TAB on a list expands the query to  'tlo board name 〉 list name 〉 ' (trailing space again) and your script filter shows the contents of the list and so on.

 

The trailing space is important because you can use that to jump back up a level: if the user deletes the trailing space (i.e. the query now ends with , you pop the last level off the query and go back to the previous list.

 

Carlos's Recent Items workflow uses this technique, as do my Smart Folders and Packal Search workflows. My workflows might be of more use to you as a guide, as they're written in Python (which I think you're using, too).

Edited by deanishe
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...