Hi there, I often wanted to add the current URL from iPhone’s Safari to DEVONthink 3’s reading list. That’s possible by using a bookmarklet and a macOS Mail.app rule.
On iPhone the bookmarklet grabs the current site’s name and URL and fills a new mail with it, ready to send it to yourself.
On Mac the mail rule looks for a specific string (I use @r |
) in the subject of the received mail and starts an AppleScript that adds the URL to DEVONthink 3’s reading list.
To add the bookmarklet to Safari
-
create a bookmark for an existing website in Safari’s favorites (e.g. https://www.eastgate.com/Tinderbox/Specials/SummerFest.html) (that’s necessary as it doesn’t seem to be possible to create empty bookmarks in Safari. By the way it’s easier to do this on Mac (if you sync Safari on macOS and iOS…)
-
in Safari open the menu which lets you edit bookmarks
-
change the URL of the created bookmark to
javascript:location.href='mailto:YourEmailAddress?SUBJECT=@r%20%7C%20'+document.title+'&BODY='+escape(location.href)
(the question mark after your mail address is part of the bookmarklet, don’t delete it) -
change the name of the bookmark to something meaningful
To add the mail rule to Mail
-
create a new rule that looks for the specific string in the subject (e.g.
@r |
) -
as action choose “Delete mail”
-
save this script and add it to mail’s script folder (found in the context menue of the Mail.app AppleScript action). Attach it as second action to the rule
using terms from application "Mail" on perform mail action with messages theMessages tell application "Mail" repeat with thisMessage in theMessages set theSubject to subject of thisMessage set theName to characters 6 thru -1 in theSubject as string -- change if you don't use "@r | " in the bookmarklet set theBody to content of thisMessage set theURL to paragraph 1 of theBody tell application id "DNtp" add reading list URL theURL title theName display notification theName with title "Added to reading list" end tell end repeat end tell end perform mail action with messages end using terms from
In german it looks like this
Now when you want to add an URL from iPhone (or iPad, but I didn’t test this) to DEVONthink 3’s reading list it’s just 3 taps: one on Safari’s address bar to access the favorites, one on the bookmarklet, one on “send” in Mail.app. That’s it