Lipsum Text Workflow for Alfred 2

I’ve updated the Lipsum Text extension I created for Alfred into a new Workflow for Alfred 2. Now you can select the type of text content that you want instead of having to type it in as a parameter.

For those interested, there was also kind of a weird issue getting this swapped over as well because of newline characters. I changed the URL that was being posted to from http://lipsum.com/feed/html to http://lipsum.com/feed/json to grab the output as JSON. That kept me from having to parse HTML. The downside is, when requesting multiple items (i.e. 3 paragraphs), the newline characters were breaking the PHP json_decode function. It was breaking the JSON string into multiple parts (as an array). So to fix it I just made it count the number of items in the return value (there should only be one), if there was more than one, it used the implode() function to puts all the pieces together, then decode the JSON string.

Anyway..

Download