Jump to content

Recommended Posts

I've created a workflow that allows me to create new stories in pivotal tracker (e.g, "pt this is the name of a new story") which has been fantastic to have. What I'd like to do next is to take the XML response and parse out the useful piece of information: namely the Tracker story number that's generated.

 

So far, the work I've done has been purely through bash and no "real" language. I'm wondering how I would go about implementing the next step. Thanks!

 

K

Share this post


Link to post

I've created a workflow that allows me to create new stories in pivotal tracker (e.g, "pt this is the name of a new story") which has been fantastic to have. What I'd like to do next is to take the XML response and parse out the useful piece of information: namely the Tracker story number that's generated.

 

So far, the work I've done has been purely through bash and no "real" language. I'm wondering how I would go about implementing the next step. Thanks!

 

K

 

PHP is my favorite language for workflows, and it has 'SimpleXML' functions to parse XML into objects. I use this quite frequently when pulling data from the internet; the principle could easily be applied to your situation.

Edited by Tyler Eich

Share this post


Link to post

It's been forever since I've done any PHP. Anyone have an example? I'm also wondering, specific to workflow scripting, how I'd chain this. The output XML comes out of the middle script as {query}. Flowing it into clipboard obviously won't work but I can't just put an intermediary step of script since workflows seem to only permit 3 steps.

Share this post


Link to post

It's been forever since I've done any PHP. Anyone have an example? I'm also wondering, specific to workflow scripting, how I'd chain this. The output XML comes out of the middle script as {query}. Flowing it into clipboard obviously won't work but I can't just put an intermediary step of script since workflows seem to only permit 3 steps.

 

Check out 'Workflows > [+] > Examples > Google Suggest'; it parses the simple Google suggestion XML and outputs the result

Share this post


Link to post

It's been forever since I've done any PHP. Anyone have an example? I'm also wondering, specific to workflow scripting, how I'd chain this. The output XML comes out of the middle script as {query}. Flowing it into clipboard obviously won't work but I can't just put an intermediary step of script since workflows seem to only permit 3 steps.

 

Just to expand on Tyler's response, he and I both make our workflows using PHP. Either of us could help you. I'd especially be happy to help. I am the Alfred Community Support lead. If you have any questions or need help with anything, I'd be happy to help. You can reply here, shoot me a message, or send an email to david at alfredapp.com

Share this post


Link to post

Thanks David and Tyler. Looks like I got it working as I wanted and more. Here it is:

 

http://d.pr/f/7L8p

 

Now the only thing I want to do is configure it so that I can set command-1 and command-2 (the actions) to different projects. This is through generating some XML as a result right?

Share this post


Link to post

Thanks David and Tyler. Looks like I got it working as I wanted and more. Here it is:

 

http://d.pr/f/7L8p

 

Now the only thing I want to do is configure it so that I can set command-1 and command-2 (the actions) to different projects. This is through generating some XML as a result right?

 

Either that or creating a second keyword. Generating the XML is for when you use a Script Filter (not a keyword) and want to generate your own results to be shown in Alfred.

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