So I solved my own problem by using Base64-encoded HTML and the
createdocument command with
I quite like the resulting Shortcut:
Note: you need to add an “Open X-Callback URL” to the end of that to use it as a standalone shortcut
When you share a website or link to that Shortcut, it first checks that the shared content contains an article. If it doesn’t, it just saves a bookmark to DEVONthink. —if it does, it creates a nicely-formatted HTML file with a good font-size for e.g., iPhone reading without zooming around the page. Then, I have a simple Smart Rule that recognizes HTML files tagged with
.convert—it converts the nicely-formatted HTML to a PDF for highlighting or whatever.
I use that Shortcut in combination with this one to clip things to DTTG/DT3:
The latter Shortcut checks whether the item is a URL, “Safari”, “Article” (two Shortcuts types that I don’t quite understand), PDF, or text. If it’s the first three, it triggers the earlier-mentioned Shortcut. If it’s a PDF, it encodes it into base64 and saves it. If it’s text, it saves it as a Markdown file.
This is based on an earlier Shortcut created by Federico Viticci of MacStories a few years ago. It streamlines the clipping process for me while providing a bit more control over what the resulting files look like.
Finally, @BLUEFROG—the Shortcut uses x-callback to create that markdown-formatted item link list.