After trying a bookmark manager, I decided no, I really wanted my bookmarks in DEVONthink, for convenience of filing, privacy protection, and having one place to search for information.
Unfortunately I’ve also concluded that regular bookmarks (i.e. Apple webloc files) aren’t good enough. The problems:
- There’s no way to put a description or keywords or anything else useful into the file. You can put a description in the Finder comments, and I tried that for a while, but…
- In DEVONthink, the smart sorting suggestions don’t work unless you actually load the page, which also means you don’t seem to get filing suggestions based on other bookmarks. This makes filing a very manual process.
I considered storing pages as formatted text, but that’s bad because they’re often huge, because of how bloated modern web pages are. Web archives are just as bloated.
So… I decided I wanted to store my bookmarks as Markdown consisting of a heading, a clickable URL, and then arbitrary description, hashtags, and so on. The problem was to convert my hundreds of existing bookmarks.
Step 1 is easy: tell DEVONthink to import the bookmarks from an HTML file written out by the bookmark manager.
Step 2 is also easy: tell DEVONthink to convert the bookmarks to Markdown. It goes away and fetches the corresponding page, and cleans it up.
Unfortunately the cleaned page is often still full of junk. Sometimes the web site is constructed badly and you get nothing useful, or they are blocking based on user agent to try to stop bulk AI scraping. In that case I settled for opening the web page, doing select all, copy, and then paste into the markdown in DEVONthink, because of the next step…
Step 3 for me was getting Apple Intelligence to summarize the markdown. That turns out to be tricky, because as far as I can discover you can’t call Apple Intelligence from AppleScript. You can call it from Shortcuts, but you can’t call DEVONthink from Shortcuts. So I flailed around until I’d worked out how to put together a shortcut to summarize text, and AppleScript to call it. Wrapping a loop around to do the rest was fairly easy.
Here’s what the Shortcut looks like:
Here’s the AppleScript:
tell application "DEVONthink"
set theSelection to the selection
try
show progress indicator "Summarizing…" steps (count of theSelection)
repeat with theRecord in theSelection
set theName to name of theRecord
set theURL to URL of theRecord
set theGroup to parent 1 of theRecord
set sourceMarkdown to markdown source of theRecord
step progress indicator theName
tell application "Shortcuts Events"
set theSummary to run shortcut "Summarize text" with input sourceMarkdown
end tell
set markdownContent to "# " & theName & linefeed & linefeed & ¬
"<" & theURL & ">" & linefeed & linefeed & theSummary
set newRecord to create record with {name:theName, |type|:"markdown", content:markdownContent} in theGroup
set creation date of newRecord to creation date of theRecord
set label of newRecord to label of theRecord
set flag of newRecord to flag of theRecord
set URL of newRecord to theURL
delete record theRecord
end repeat
hide progress indicator
on error error_message number error_number
hide progress indicator
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
end try
end tell
The script creates a new item and then deletes the old one because I couldn’t persuade DEVONthink to let me update the markdown content of items. Probably something I was doing wrong in AppleScript, which I continue to dislike intensely.
After summarizing, I end up with small markdown documents with summaries. The summaries aren’t always great, but they’re good enough for searching and sorting, which is why I want them. I then go and delete any Assets DEVONthink automatically brought in (since that’s my normal preference).
I order the documents title - link - summary, whereas DEVONthink’s convert to markdown puts the link first then the title. I prefer the title first, and it also gives me a way to see if I’ve fed a particular document through the summarizer yet.
Thanks to this project I can report that after a few hundred uses of Apple Intelligence it stops working (probably due to a memory leak) and you have to reboot your Mac. Maybe they vibe coded it.
Anyway, hope this helps anyone else tackling the same problem.


