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

Link to comment

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
Link to comment

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.

Link to comment

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

Link to comment

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

Link to comment

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.

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