One of the tools included with all Mac versions of DEVONthink is the Sorter. The DEVONthink Sorter is an optional tool that hangs out at the side of your screen. You can drag files to it, and send them off to preconfigured locations within DEVONthink. I liked the functionality of the Sorter, but didn’t like it always hanging out at the edge of my screen, so I came up with an alternative that resides in my Mac’s menu bar.
The image above shows the Sorter, collapsed to the left edge of the screen. When you drag a file onto the Sorter, it expands, as displayed in the image below.
As a Sorter alternative, I use Dropzone, a $10 app available on the Mac App Store. Dropzone resides in the menu bar of your Mac. You preconfigure Dropzone with a number of actions that appear in a dropdown window when you drag a file onto the Dropzone menu bar icon. Each action gets its own icon in the Dropzone dropdown window, and the action is performed when you drop the file onto the icon. For example, you could have an action that moves a file to a folder, or an action that opens the file in a specified app.
Here is a screenshot of the Dropzone actions on my MacBook Pro, with three DEVONthink actions in the middle row:
It took three steps for me to configure Dropzone as a Sorter replacement:
1. Create a folder in Finder.
The name and location of the folder doesn’t matter – just create a folder on your Mac. Although not required, it will be easier to keep things straight in your head if you give the folder a name similar to the DEVONthink group or database where you want your files to end up. The reason for this will make more sense in step 2, below. If you’re on OS X Sierra, and have turned on iCloud Drive’s ability to sync the Desktop and Document folders, I also suggest you do NOT put your folder in one of those two locations.
2. Attach a Hazel rule to the folder
This next step is to create a Hazel rule to monitor the folder you just created, and perform some automation magic on it. Here’s what my Hazel rules look like:
And here is the embedded AppleScript used in the “Run AppleScript” part of the Hazel action:
tell application id "com.devon-technologies.thinkpro2" set img_ib to get record at "/Inbox-records" in database "@p:records" import theFile to img_ib end tell
This particular Hazel rule takes files placed into the folder, and moves them into a database in DEVONthink called “@p:records,” and, more specifically, into the Inbox group in that database. Once the file has been moved, the rule sends me a notification and deletes the file from its original location on my Mac. To use this on your Mac, you’ll need to change the AppleScript to reflect the name of your database and the name of the group (such as the Inbox) where you want your file to end up. Please note that in my case, I’ve renamed my Inbox to “Inbox-records.” Yours will just be called “Inbox” if you haven’t changed it.
I initially had this Hazel rule set up to use an Automator action instead of AppleScript, but this resulted in the rule opening a new DEVONthink window every time it was run. I haven’t had this problem so far with the AppleScript.
3. Set up your Dropzone action
In Dropzone, you’ll want to set things up by choosing “Add to Grid,” followed by “Move Files.” In the window that appears, select the folder you created in step 1, above. If you want to get fancy, after you’ve added the folder you can right click to edit it, and assign an icon to it.
Once you have everything set up, you should be able to drag a file or email onto your menu bar, find your folder target in Dropzone, and drop your item onto it. The item will be moved into the proper location in DEVONthink.