Jump to content
frankspin

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.

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

In my experience, this is something that can be a bit hard to get your head around.

 

If you put your code up on GitHub or similar, I'd be happy to offer my help as someone with considerable previous experience of finding it a bit of a challenge…

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...