This approach uses Keyboard Maestro alone - if you don’t own it already get the demo from keyboardmaestro.com/main/ - I couldn’t use a mac without it (alongside Alfred and Default Folder, it’s one of the first programs I install on a new Mac).
As was kindly pointed out by Jim Neumann, you can initiate the Web Clipper via File > Import - so this has allowed me to dump the Applescript aspect of my previous approach. I’ve also fine tuned the timing aspects of the Macro and ensure that all interface control is automated via DEVONthink’s menu system (less errors this way).
I’ve attached the KM macro so you can easily import it into Keyboard Maestro but this screen-grab shows the core of what’s going on.
Korm asked that I explain my usage scenario a little more so here goes:
I have a huge archive of Pinboard bookmarks and I add at least 50 new bookmarks every week. Whilst Pinboard is great to search via tag, it’s full text search is flakey to say the least and lacks DEVONthink’s sophisticated search AI. For me to get the most out of all the research I store in Pinboard I download my bookmarks into DEVONthink (via the Applescript available via the Support Assistant in DT’s help menu), and then use my KM macro to bulk convert those bookmark files to Markdown content via the Readability API so the resulting Markdown is focused on the content only.
The reason I prefer Markdown as my storage format of choice within DEVONthink is that a captured page takes up a very small amount of space (because it’s a plain text file) - approx. 10k vs 1mb for the same content captured via PDF or Rich Text.
Some important things to consider when using the Macro:
-
You need to have set up the Web Clipper with your preferred options before you run the Macro (the Web Clipper always uses the last set of options by default
-
The Macro allows 5 seconds between each web page capture which should be enough time for the Web Clipper to do it’s thing but you can’t predict for slow websites so it’s good to chunk your import tasks to a manageable number (100 records at a time works for me) and watch for errors.
-
Some websites don’t allow themselves to be parsed via Readability (Fast Company & Read/Write spring to mind) but Readability allows for this and captures the source URL within the Markdown. You can use this source link to recapture the page as a PDF directly from the Markdown record (this occurs less than 5% of the time for my bookmarks but your own use case scenarios may differ).
-
Whenever capturing from the web it’s best to run automation tasks in the morning. Websites tend to respond quicker in the morning, particularly here in Europe when most of the USA is sleeping!
I find it best to automatically have DEVONthink render my Markdown documents in ‘Best Alternative’ view: View > Best Alternative. To make this the default view for Markdown documents run the following command in Terminal:
defaults write com.devon-technologies.thinkpro2 RenderMarkdown -bool TRUE
(use FALSE to change the behavior back to the standard)
If you want to edit the Markdown document, you can make it editable via View > Text Alternative
Apologies if this all seems a bit long winded but it was pointed out to me that many users of DEVONthink aren’t regular users of Markdown.
Hope you find the Macro useful.
Convert DEVONthink bookmarks to Markdown.zip (1.1 KB)