Counting Actions with Workflow and TextTool

Something I have been interested in Workflow is find out how many actions are actually included in a paticular workflow. The only way I knew how to find out was to either search in Spotlight for it, or call a list of your workflows, from within a workflow, followed by a choose from list action. This works but I wanted to know if there was a way to get it for all of them. I asked on twitter about it and @nahumck was nice enough to provide an answer for me. So I have to give full credit to him and I would encourage you to check out his fantastic website. The workflow he provided lets you pick an individual workflow to get the result. You can get it here.

I modified the worfklow I got from @nahumck and had it send to an app titled TextTool (workflow has build in support for TextTool). That app would sort the workflows by number of actions, from most to fewest. It's imporant to note that actions which contain multiple segments count for more than one. For example, the If block, when empty, contains three actions. If, Otherwise, End If. The workflow ends with a quicklook but can be easily modfied to share that text if you want. Really I just run it when I'm curious and don't actually do anything with the result. You can get the workflow here but there is one major asterisk with it. TextTool is no longer available on the app store.

However, TextTool 2 2 is available. It's not directly supported in Workflow yet (and it's impossible to know if it will be) but it does have a pretty extensive URL Scheme which of course you can utlitze in Workflow.

So I took the same workflow I used with TextTool 1 and modified it to send the results to the TextTool 2 URL scheme. This is the URL I used.

texttool2://x-callback-url/edit?text=> URL Encoded Text> &transform=Sort%20Lines&method=alpha&direction=descending

I haven't been able to get a reliable output to come back from the URL scheme. And by that I mean, returning to Workflow, at the point I left it with the sorted text. If I wanted to dump it in a different app or into a different workflow then that I could do. But It's not something I'm spending a lot of time on, since as I said above, it's really not meant to be actionable information for me. You can get the workflow here