I recently posted a script I was using to archive my linkding bookmarks to Markdown files in nvUltra. I’ve since started digging into DEVONthink and have updated the script to archive my bookmarks there.
I still use my bookmarks with nvUltra by indexing a notebook in DEVONthink and saving the bookmarks there. Most of my bookmarks are still archived as Markdown, so that allows me to view and edit content in either place. (The same could be done with Obsidian.) Web archives and PDFs also display in nvUltra, so I have both options available for viewing. But in DEVONthink I can link the archived bookmarks to other documents, tag and classify them, and annotate all types with highlights and notes.
The script I’m running allows me to tag bookmarks to be archived, just like the original script. The script runs at regular intervals using launchd on my always-on Mac Studio. It’s a self-contained script that requires just Ruby and one gem (HTTParty) to run. It’s best run as a user agent, but it should work if run as a global agent (as root) as well. Installation and configuration are documented in the README (and in the script comments).
Aside from having my bookmarks readily available in DEVONthink, this also allows me to make use of DEVONthink’s clipper, making conversion to webloc bookmarks, PDF files, or web archives easy, in addition to Markdown notes.
I set the script up to use Marky 2.0 as the Markdownifier, but have been getting sketchy results for some reason, so I currently have it configured to use the version of Marky 1.0 that DEVONthink has built in. I hope to fix this soon. Switching is just a configuration option, so watch here for an update when I get it smoothed out.
The script allows configuring a single tag that will cause a bookmark to be ingested, and there are other tags to specify what type of bookmark is saved: PDF, web archive, webloc (bookmark), or Markdown. The way I run it, any bookmark tagged with the main .archive
tag gets saved as Markdown unless I also specify one of the other types. If you don’t set a default type, you can save as both Markdown and another type.
See the Gist link below to download the script. The configuration options are all in the options
variable at the top, and are well-commented. Define your server information, the DEVONthink database and group to use, and the tags you want to use for the various types.
I recommend LaunchControl from soma-zone for editing launchd jobs. It makes setting all of the options easy, and loading/unloading a job is just a button click away.
Please let me know if you use it and have any issues. I know this is a very specific use case and maybe one or two people will ever need it. No matter, I needed it for my own use, but if it helps anyone else, I’m always happy to share.