Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use multiple databases with DEVONthink Personal Apps
DEVONthink (Dt from here on) is an amazing application, and the more I use it, the more I come across things I want to do with it. One of its limitations, however, is that you're limited to one database with the personal version, and the Pro version still hasn't been released (plus, the Pro version will cost more money once it is released). For those wanting to run multiple databases now, using the Personal version, here's my solution...

Like many apps, by default, Dt stores its database under the folder ~/Library/Application Support/DEVONthink. However, you can get around this limitation by creating several databases, and then symbolic linking the database you want to use to the aforementioned ‘Application Support' folder, replacing Dt's original folder with the symbolic link. Some of you may already know about doing this, as this works for a lot of applications under OS X, and most Unix-based machines.

What I did was created several databases by copying the original ‘virgin' copy of the Dt database folder (again, ‘~/Library/Application Support/DEVONthink'), moving them into a separate folder under my Documents folder. I then created several short, executable, Unix scripts which handle removing the old symbolic link and replacing it with a symbolic link to one of the new databases. After that, I used the free, and amazing Platypus GUI creator to create a clickable iconized version of each of these scripts, so that I could click an icon, rather then open a terminal to run these.

So, here's a recap of the steps, along with some examples:
  1. After installing Dt, launch it once, and then close it. Go to the aforementioned Application Support folder, and you'll see a folder labeled "DEVONthink." Copy (or move) it to a folder somewhere else for storage (I created a subfolder to my documents folder). Name this folder something meaningful. For example, I made three copies of the original Dt folder, naming them "Ebooks," "Web Development," and "Daily."

  2. Create a unix script that will remove an existing symbolic link, and replace it with as new link which points to one of your new databases. As an example, here's one of my scripts:
    #!/bin/sh
    # Remove old link: 
    rm "/Users/amh/Library/Application Support/DEVONthink"
    # Create new link: 
    ln -fs "/Users/amh/Documents/Program Settings/DEVONthink/Ebooks" /tmp
    # Rename new link to "DEVONthink": 
    mv /tmp/Ebooks /Users/amh/Library/Application Support/DEVONthink
    # Launch DEVONthink: 
    open -a DEVONthink
    
    After the script is created, chmod it to 0777 in order to make it executable. If you want, you can also download Platypus, load your new script into it, and create a clickable icon for the script.

  3. Once your scripts are all set up, the first thing you want to do is delete the original Dt database folder, and replace it with it with a link to one of your new databases. If you skip this step, when you run your scripts you'll receive an error, as the scripts are setup to delete a symbolic link only, not a directory
Now you're done! Just run one of your scripts, and start entering data into Dt. It's probably also worth pointing out that Dt will continue to open the same database that it used when it was last opened until you run a different script, replacing the symbolic link.

This 'workaround' works with most apps also -- for instance, you can get around the one database limitation of MacJournal (the free version, at least) the same way. Hope this saves someone some time, as it took awhile before I came up with this solution. There are other ways to achieve this same thing, but this is the most efficient that I've found so far.
    •    
  • Currently 2.60 / 5
  You rated: 1 / 5 (5 votes cast)
 
[11,801 views]  

Use multiple databases with DEVONthink Personal | 6 comments | Create New Account
Click here to return to the 'Use multiple databases with DEVONthink Personal' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use multiple databases with DEVONthink Personal
Authored by: tinker on Feb 16, '05 11:55:11PM

This is a very cool hint, thanks. I've always been annoyed at having to put disparate items together in one big DEVONfile; this is a much better way of doing things.



[ Reply to This | # ]
Use multiple databases with DEVONthink
Authored by: meddling on Feb 21, '05 01:29:58PM
I also think this (and MacJournal) are great programs, but I don't understand why they don't support multiple databases out of the box. The shell script could be a little simpler, though:

#!/bin/sh
ln -fvhs /Users/bmedling/Documents/DevonTHINK\ Databases/Research/ /Users/bmedling/Library/Application\ Support/DEVONthink
# Launch DEVONthink: 
open -a DEVONthink
ln will overwrite a previous link with the new link.

[ Reply to This | # ]
Use multiple databases with DEVONthink Personal
Authored by: perate on Mar 02, '05 01:51:00PM

This is something I've hoped for for a while when I saw this hint I thought AppleScript would be a good candidate to manage the databases. So with a lot of help from HD over at the appleScript forums I've put this together.

See the thread with the script (the one at the bottom)

thanks again.



[ Reply to This | # ]
Use multiple databases with DEVONthink Personal
Authored by: klimtdecor on Mar 19, '05 11:49:56PM

Fantastic! Thanks so much for working out an Applescript solution.

I love DEVONthink but have always been frustrated with the one database configuration. I was so excited when I saw this hint but then cautious because I've never worked with shell scripts before (and wasn't sure if it was time to start).

It works great! Thanks so much for posting.



[ Reply to This | # ]
Uh-oh
Authored by: tinker on Mar 19, '05 02:41:08PM

I've had this set up since the hint was posted. I just ran DEVONthink, and all of the "new" options are greyed out -- no ability to create new groups or new items. This hasn't happened before. Any thoughts would be appreciated.



[ Reply to This | # ]
Uh-oh
Authored by: tinker on Mar 19, '05 02:49:07PM

Of course, immediately after posting this I figured out the answer. For some reason ownership of the libraries had been set to root. A simple chown command fixed everything. Weird.



[ Reply to This | # ]