Re-enable the Mail Plugin/DEVONthink on Mojave

If you use DEVONthink on your Mac and have recently updated to Mojave, you may have noticed a disconnect between the application and Mail. This is down to the new security features that have been implemented in Mojave and requires just a little intervention on your part to remedy. It’s quick and easy. 

1 - Go to System Preferences -> Security and Privacy and enable full disk access for DEVONthink.

dtmail1.png

2 - Install the Mail plugin from the Add-ons within DEVONthink

dtmail2.png

3 - Enable the Mail plugin by opening Mail -> Preferences in the screenshots below

dtmail3.png
 
dtmail4.png

Hazel and DEVONthink 2 - Choosing a Target Database

In my previous post on using Hazel and DEVONthink together, I showed you a system I use to automatically get files and documents into the DEVONthink Pro Office Global Inbox.

Did you know, however, that is possible to import content directly into a database of your choosing? It DOESN’T have to just move to the Global Inbox?

Full credit to Alan Duncan of [ojisanseiuchi.com] for this nugget.

Here is how:

When you have configured your Hazel rules to identify the files that need to moved, add this AppleScript to the actions that will be carried out:

tell application id "com.devon-technologies.thinkpro2"
    set img_ib to get record at "/Inbox" in database "Business"
    import theFile to img_ib
end tell

This script will tell Hazel to take the content we have already identified and import it into my Business database. To change the target database, simply modify the name in the script.

Couldn’t really be any simpler at all could it?!

Thanks Alan.

Making DEVONthink and Hazel Play Nicely

Before I move on with this post, I'm going to make a couple of assumptions. I'm going to assume that you already understand that Hazel is an amazing application for macOS, that watches over folders in some form of virtual nanny-state, performing file actions on your behalf whilst you get that busy work done.

I'm also going to continue on the basis that you know about the awesome power of DEVONthink Pro Office, the Database/Paperless Office/Finder Replacement/All round swiss-army-knife-type-storage-app for macOS.

They are both amazing applications and I couldn't imagine having to live without either of them. However, after reading various forums and listening to some of my favourite podcasts, it seems that the general impression is that you can't have a workflow that includes them both. Using Hazel to rename files isn't possible within DEVONthink itself.

While the statement above is largely true, a small amount of lateral thinking can, however open up some possibilities.

I'm going to walk you through the setup I have employed to allow for the renaming of files with Hazel and subsequent import into DEVONthink Pro Office.

1) All files downloaded to my Downloads folder (the default)

2) Hazel watches this folder and automatically performs OCR on any PDF files that appear, using AppleScript and PDFPen Pro

3) These files are then renamed and moved to a Holding Folder I have in Dropbox.

4) Using the built-in Folder Actions for DEVONthink, a script runs on all contents of the folder. This script will Import, OCR and Delete the original file.

Dropbox Holding Folder

The first stage is to set up a Holding Folder. Now this Holding Folder has one purpose and one purpose only. It will perform a Folder Action that will Import a file into DEVONthink, perform OCR (Optical Character Recognition, making the contents of the document searchable) and Delete the original. This folder is the final place files will reside before import into DEVONthink.

The OCR that will be completed in this stage will be using the ABBYY Fine Reader Engine, arguably the most powerful OCR software on the Mac and built-in to DEVONthink Pro Office. We're going to be performing a 'lighter' (yet still powerful) OCR at an earlier stage, so as to rename the file effectively, however the final OCR will take place here.

Why have I specified that this should be setup as a Dropbox folder? Well, firstly, any folder connected to a Cloud Service is fine (Google Drive, OneDrive, iCloud) - I just happen to use Dropbox extensively. Secondly, I find myself scanning and submitting business expense receipts from iOS a LOT. I use PDFPen Scan+ to scan the receipt, I rename with a TextExpander snippet before sending it directly to my Dropbox Holding Folder. When it reaches my Macbook, the Folder Action kicks off and the file is imported into DEVONthink.

Assigning Folder Actions

Assigning the Folder Action to your newly created Holding Folder is a simple process.

  • Open Spotlight
  • Search for Folder Action Setup
  • Click the + button on the left hand pane. Navigate to the Holding Folder you wish to assign the action to.
  • You will be presented with a list of scripts to assign. Select Devonthink - Import, OCR and Delete.scpt

Please note, you must have the scripts for DEVONthink installed. If you don't see any DEVONthink references in the box of assignable scripts, install them by clicking on DEVONthink Pro Office in the menu bar, select Install Add-Ons and tick the check box for Folder Actions Scripts.

 

Great stuff. You now have a folder that will act as a direct conduit between yourself and DEVONthink that is accessible from anywhere you have an Internet connection.

Hazel Rules

OK. Now, we need to set up some Hazel rules. The question we need to ask ourselves, however, is where should these rules be applied? We've set up a Holding Folder, which is going to Import, OCR and Delete thanks to the Folder Action we assigned, yet this folder needs to be the last stop for the file - the final conduit between Finder and DEVONthink. Therefore I apply the majority of my Hazel rules to the default Downloads folder. These rules will carry out some OCR (using PDFPen Pro from Smile Software and subsequently rename the file based on the results.

I'll refer to you an earlier post on Date Matching with Hazel which runs through the process of scripting the OCR, looking for a date within the contents of the document and subsequent renaming.

The only part you need to add to the rule, in order to import into DEVONthink, is to move the file into your Holding Folder once renaming/tagging etc is complete. (Remember, DEVONthink recognises Finder tags, so you can use Hazel to pre-tag your files before they hit your DEVONthink Inbox)

You can make a lot of changes to the workflow above to suit your specific needs. I know that this works for me and apart from the odd tweak here and there, I'm very happy with how it runs.

There will be a video posted soon that walks through this process in finer detail - sometimes screencasts work better than text ever can, so watch this space and I'll let you know when it's ready!

Plain Text Notes with DEVONthink To Go 2

I recently decided that I wanted to move away from a traditional note taking application and more towards a plain-text solution. This is no slight at all on Evernote - I certainly am not part of the band-wagon of people berating them for their recent
price hike and change to their plan offerings. Personally, I think that the subscription model they run works and if that's what they need to do to sustain themselves and continue to provide an offering to customers that rely on them, then more power to them.

No, my driver for this shift in workflow is more down to simplicity. I want to make every effort to centralise as much activity as I can into as few applications as necessary. To that end, I want DEVONthink Pro Office to be my hub application of choice.

I have always had resistance to this, mainly because I get a lot of my research on the move and their iOS offering, DEVONthink To Go was distinctly lacking in functionality. I didn't want to rely on this for retrieving information.

With the release of DEVONthink To Go 2, that problem is no more. I've been part of the beta program and I can safely say it's revolutionised how I gather information on the move in iOS. To the point where, even on the beta version, I was able to migrate my notes away from Evernote and into plain text format.

The components to this are as follows:

Dropbox

All of my plain text notes live within Dropbox in a folder named nvALT/Cabinet. Everything goes in here, from running lists to pieces of information that I know I'm going to need to retrieve at some point in the future. I reference everything from this one folder. Storing within Dropbox gives me the peace of mind of knowing I can reliably obtain any notes quickly and efficiently on any device and, being in plain text format, retrieval is quick and easy.

nvALT

nvALT is my note taking application of choice on the Mac. This is the main method I use to get the notes into Dropbox when
sat at my laptop. By utilising the keyboard hack I wrote about here to modify the Caps Lock key, I can simply depress Caps Lock + N to open nvALT ready to take a new note or search for an existing one. It's lightning fast.

The location that nvALT queries to pull up the list of available plain text files is
the Dropbox location identified earlier.

Note - when configuring, it's important to store the files as Plain Text Files within nvALT as opposed to a Single Database.

 
 

Drafts

Drafts is an iOS application, used to get thoughts out of your head and into some other ecosystem, ready for you to deal with at a more appropriate time. When you open the app, there is a blank screen (similar to nvALT) ready for you to unload. Once you have entered your text, you can perform actions that transmit your entry into a further application. I use Drafts extensively, however the main use involves uploading/appending plain text files in Dropbox. I roughly outline that process here

DEVONthink Pro Office

Now we move into the central hub. DEVONthink Pro Office is an OS X application that I use for my document management solution. Everything goes in here, from bank statements to client contracts and with seamless synchronisation now in place to DEVONthink To Go, I've got everything searchable from any device.

In order for DEVONthink to see the plain text notes contained within Dropbox, we need to point it towards their location. This process is referred to as indexing and I've previously published an article on how this process works. Indexing a folder located on your Mac is as easy as selecting File -> Index or using the keyboard shortcut ⌘⬆X. The standard dialogue window for Finder will appear, allowing you to browse for the folder containing your plain text notes.

This allows you to use DEVONThink Pro Office to search for your plain text notes and amend them as you like.

Indexing isn't just restricted to text files. You can use this function to index any external folder you need. All of your screenshots contained within an iCloud Drive folder? Link it to DEVONthink via an index. I have all my mindmaps stored in a Dropbox folder so that I can work on both my iPad and MacBook as appropriate, however this folder is indexed within DEVONthink so that I can tag and link to the appropriate project it's related to.

DEVONthink To Go 2

Searching for my notes on iOS is now simpler than ever. With DEVONthink To GO 2, I can set up synchronisation of any databases stored on my Mac to my iOS devices. With the original iteration of DEVONthink To Go, this was a manual process. I was reliant on an OmniFocus task to nudge me in the direction of carrying out this sync task and more often than not, it would be missed. Now, I have set it and can forget it. Synchronisation is automatic, so my data is always available.

To search for a note, pull down on the screen just as you would do within iOS itself and enter your search criteria. You can search all databases or a specific database/group.

Conclusion

So - that's pretty much that. What may appear to be a lengthy workflow is simple when you look at it's individual parts. I'm very happy with how this works and it's worth pointing out, this doesn't just apply to the plain text notes I would have stored within Evernote. Some image files are indexed from a Dropbox folder to DEVONthink, with others stored directly in the DEVONthink database itself, alongside the web-clippings that would have otherwise been stored in Evernote.

I genuinely think DEVONthink now acts as my all-in-one solution for document management on all platforms now.