This post by Dr. Drang reminded me of a powerful feature in Workflow for iOS. No, it’s not URL de-duplication. I think the good Dr.’s solution is just fine. I want to talk about Workflow’s content graph.
The content graph is core to how Workflow passes data between actions but rarely needs to cast anything between types. There’s an action in Workflow that gives us a peek inside all of this mess to see what’s going on. I encountered the URL duplication (and sometimes title text duplication) that Dr. Drang sees. My approach to solving this was slightly different but I started with the content graph to see just what the heck apps are passing.
Here’s the first level of the content graph for the Washington Post app, which doesn’t seem to duplicate URLs for me any longer:
This basically tells me that the app is pushing out two objects, the title as text and some “HTML."1 Drilling into that HTML I see that it’s really just a URL that’s also connected to lots of other content I can explore.
There’s a really neat thing about the content graph. Each bubble is interactive and hides even more content behind it. Drill in on the “URL” content and I can access the URL as a string object or an NSURL or several other types. I can share individual representation from within the Workflow content graph. Unfortunately, the Workflow app is so poorly maintained by Apple, no one seems to notice that the share and “Back” icons are often white on a white background. So it’s usually better to keep drilling down on the object to expose the NSString.
For more fun with the content graph, drill in on the “Page” content and access a PDF object of the page. Drill in further on the PDF and we can access various image types of the PDF. Each one of these can be exported from Workflow.
Now, back to this duplicate URL issue. My solution was much more pedestrian. I created a workflow that accepts URLs and then shows them as a list to select from in Workflow. Tapping the URL copies it as text to the clipboard. I don’t know if this would solve all of the issues Dr. Drang sees, but it works for me in a variety of scenarios.
A new solution available with iOS 11 is to use one of the several excellent shelf apps on the market. I think Gladys is currently the best option. These apps also reveal the underlying complexity when an app exports a URL. In this case, sharing a link from the Washington Post app to Gladys reveals the two part object.
This also solved an annoying problem I had with CARROT Weather when sharing a forecast. Most of the time I just want the forecast as a PNG and not the snarky text. Gladys captures it all and then lets me select which part I want to pull out and share. Sure, it’s an extra couple of steps, but it’s less effort than deleting a bunch of junk in a text message before sending it.
I dislike sharing a URL plus the article title since apps like Messages already expand the URL to show the title. I generally just want the URL alone. ↩︎