-- Add current Safari tab to DEVONthink 3's reading list
tell application "Safari"
tell current tab of window 1
set theURL to URL
set theName to name
end tell
end tell
tell application id "DNtp"
try
add reading list URL theURL title theName
display notification theName with title "Added to reading list"
on error error_message number error_number
if the error_number is not -128 then display alert "DEVONthink" message error_message as warning
end try
end tell
I’ve been trying to do something like this in Shortcuts for iPadOS and I’m failing dismally. I can open the Reading List fine using an x-devonthink call and I can create a new bookmark in any group. (Don’t laugh – it took me hours to get even this far…)
What I can’t find is a way either to move/add the imported bookmark to the Reading List programmatically, or to move it directly there from Safari without having to import it at all (as Christian’s script does).
Currently, Shortcuts has no access to the Reading List as it’s a property of the app, not the Intents extension. It should be possible to make it work with the x-devonthink:// URL handler. We’ll have a look if how it could look like.
That’s the approach I had been using, but it means that you have a physical document in the database: if you decide you don’t want to keep it, you’ve got to delete if both from the database and from the reading list – unless I’ve missed some way of doing this. Not difficult, but something else to remember to do.
The script I listed above doesn’t add a document to the database, it just adds an entry in the reading list, so you only need to decided whether to capture it after reading.
I find that suits me better (YMMV…) so if possible it would be nice to have the same feature in DTTG. It’s not hugely important, because as you say, there are workarounds, but it would be nice to have.
Did you ever figure out how to save a webpage from safari to reading list in DEVONthink to go? I’m on IPad and would like to know how to do that, I’m thinking about just creating a database called Reading List and save them there since that’s easily doable but I’m wondering if there’s an advantage to having the webpages in the Reading List smart list