I put this together for a personal use case as I have 1000’s of Webloc files imported from my Pinboard account that I needed to convert to readable Markdown formatted files via the Readability service.
If you’ve used the DEVONthink Web Clipper from an external browser you’ll be aware of how it functions and the flexibility it provides. This script makes the clipper available from within DEVONthink itself.
Best of all, you can automate the clipper via Keyboard Maestro to step through a folder of (in my case Webloc) files and the clipper remembers the last set of preferences so it’s a simple process to chew through e.g. a Markdown file conversion task.
You can view a screen grab of the Keyboard Maestro macro here - d.pr/i/1lvSw
Have a play with the pause times in the KM macro to suite the data you’re working with. I’ve erred on the side of caution but I’ve found I get minimal conversion errors this way.
DEVONthink Web Clipper.zip (1.44 KB)
This is very clever and useful. Thanks!
Could you add a bit to your posting to explain to other readers how they would use your work? A little step-by-step walk thru will be useful. “I open blah, and I select blah blah, then I blah blah blah”.
That’s a nice little exploit, but I’m confused… Isn’t this the same as File > Import > Clip to DEVONthink ?
Yep, spot on. Can’t believe I missed that command under File > Import. I tend to drag folders into DEVONthink and only use the File menu for macro database management actions. From a pure UX perspective it could be argued that all the other commands under the File > Import menu act on data from outside DEVONthink but the Clip to DEVONthink command acts on content with the DEVONthink viewing pane so placing the command there isn’t necessarily the most intuitive UX. But I digress…
The Keyboard Maestro macro could be adapted to work strictly via menu commands quite easily (with no need to fire off the Applescript) and it would achieve exactly the same end.
Had an interesting PM exchange with Christian Grunenberg earlier today and he confirmed that the ‘create Markdown from’ command in the DEVONthink Applescript suite also uses Brett Terpstra’s API, but at the moment it doesn’t include the option to utilise the Readibility option (as you can via the DEVONthink Web Clipper). He indicated that this will be upgraded at some point. And that will allow for full automation of bulk Markdown conversion processes including error checking and such like, rather than needing to use my ‘Heath Robinson’ approach via a Keyboard Maestro macro.
Thanks for sharing - and relaying the additional info re Markdown!
I’ve now refined this approach so that it can be achieved without the need for Applescript.
Full details here: Convert URLs to Markdown v2 (no Applescript).