I’d like DEVONthink(menu bar sorter) to add an Obsidian Web Clipper–style feature that uses AI to summarize or extract webpage content and save the result as a Markdown file.
There are already several ways to achieve this or similar stuff:
- Smart rules could use the Chat Suggestions > Summary placeholder to add a comment to clippings
- Alternatively the Chat - Query smart action is able to generate a customized summary based on your own prompt
- Smart rules using AppleScrippt, see the following example:
on run
tell application id "DNtp" to my performSmartRule(selected records)
end run
on performSmartRule(theRecords)
tell application id "DNtp"
if (count of theRecords) is greater than 0 then
try
show progress indicator "AI Web Clipper" steps (count of theRecords) with cancel button
repeat with theRecord in theRecords
set theName to name of theRecord
step progress indicator theName
if cancelled progress then exit repeat
try
set theMD to summarize contents of records {theRecord} to markdown as key points summary
if theMD is not missing value and theMD is not "" then
set theURL to URL of theRecord
create record with {name:theName, type:markdown, content:theMD, URL:theURL} in (location group of theRecord)
end if
end try
end repeat
hide progress indicator
on error errMsg number errNum
hide progress indicator
if errNum is not -128 then log message "AI Web Clipper" info errMsg
end try
end if
end tell
end performSmartRule
Thanks for the suggestions. My use case is actually a bit different: in most cases, I don’t need to archive the full webpage at all. I would prefer a lightweight workflow where DEVONthink uses AI to summarize the current webpage and saves only the summary as Markdown together with the original URL. I usually prefer reopening the source in my browser rather than viewing captured webpages inside DEVONthink.
I think your suggestion is great, and I feel this is a feature I need as well.
Just use the above script in a smart rule (see Apply Script action) and the Move to Trash action to get rid of the original. Alternatively modify the script to remove the original. Then add the On Clipping trigger. Clipping a bookmark is sufficient as DEVONthink is able to summarize bookmarks too.
That would add an extra step. Actually, my current workflow—using Obsidian Web Clipper and then Hazel to move everything into DEVONthink—works very well too, and I’ve been using it for over a year (高亮、总结、剪藏-本地优先的浏览器插件 – Another Dayu). It just occurred to me today that this is something worth building into DEVONthink as a native feature.
After setting up the smart rule it would be automatically performed.
I have some webpages that I want to save in full, while for others I only need an AI-generated summary. Smart Rules don’t seem to be able to distinguish between these two cases.
You could e.g. add a flag, label or tag to mark them. Or use different formats.