This is the fastest method I have used to add bookmarks to DEVONthink from Safari. I made a simple script, with the help of another script that came with DT (written by Christian Grunenberg), that allows me to add the frontmost Safari page as a bookmark to the selected group in DT. I have this script assigned to a shortcut, and I’m using a small utility app called MondoMouse that allows me to select the DT window without clicking. All I have to do is move my mouse cursor over the DT window and it will automatically get selected. (I have the DT window positioned as a thin column-shaped window, like a sidebar, right next to my Safari window.) This saves me an extra click, so now I just have to select a group and use the shortcut. I have over 50,000 groups, so I first do a search & reveal to quickly find the right group. This is the fastest method I was able to come up with. I never use the inbox. It’s an unnecessary step. I will have to reorganize all the items in the inbox anyway afterwards. I might as well add my new bookmarks to the right groups right away. The bookmarklets would be useful if the Group Selector that appears afterwards had a search field. With that many groups it would take forever to find the right group by clicking through the group tree, collapsing and expanding. It’s just not practical because with that many groups it’s also difficult to remember the exact location of the group. Search & reveal is the only solution. As a side note, I really hope that you keep this use-case/workflow in mind when you design the iPhone app. There should be a search field after clicking on a bookmarklet in Safari Mobile that will allow me to search the database and reveal the selected search result inside a list view. Then I could, for example, save the bookmark in a location by clicking on a checkmark box next to the group name. I could then do another search and check more groups if I want to add the bookmark in more than one location. A “Done” button would exit the group selection mode and return me back to Safari Mobile. If the bookmarklet is just going to send the bookmark to the inbox, like the current desktop behavior, or just show a group list without a search field, like the current Group Selector, I will not be able to use it. Navigating a group hierarchy on the iPhone would be even slower. On the desktop I was able to improvise with this script, but on the iPhone this will not be possible.
I would really like to hear your opinion about my workflow. Can you think of a faster method for categorizing bookmarks?
The bookmarking script:
tell application "Safari"
try
if not (exists document 1) then error "No document is open."
set this_URL to the URL of document 1
set this_title to the name of document 1
tell application id "com.devon-technologies.thinkpro2"
set theRecord to create record with {name:this_title, type:bookmark, URL:this_URL} in current group
set unread of theRecord to true
end tell
on error error_message number error_number
if error_number is not -128 then display alert "Safari" message error_message as warning
end try
end tell
This is a similar script that will create a RTF document with the selected text in Safari.
tell application "Safari"
try
if not (exists document 1) then error "No document is open."
set this_URL to the URL of document 1
set this_selection to do JavaScript "unescape(getSelection())" in document 1
set this_title to the name of document 1
tell application id "com.devon-technologies.thinkpro2"
set theRecord to create record with {name:this_title, type:rtf, URL:this_URL, plain text:this_selection} in current group
set unread of theRecord to true
end tell
on error error_message number error_number
if error_number is not -128 then display alert "Safari" message error_message as warning
end try
end tell