Integrating Papers/Watched Folders

I’m loving the power of devonthink, and there’s just one major thing I’d like to have that I can’t seem to figure out.
Is it possible to have devonthink watch a folder? Or to use Hazel, applescript, automator, to automatically send new files in a folder (or subfolders) into devonthink?
I ask because I use Papers for my article searching & downloading, it integrates with my school’s proxy server and automatically applies title, author, abstract, etc… (I also use it in lieu of endnote for referencing). Long story short, it would be great to leverage devonthink’s AI and web server on my articles the way I am doing on books and notes.
Oh, and it stores its Papers (pdfs only) in a folder named “Papers” in which subfolders arranged by year of publication contain the pdfs.

Yeah. DTP comes with some folder actions on the disk image that can be attached to any folder (~/Downloads, for instance) to import everything added to that folder into DEVONthink.

Not sure why, but that doesn’t seem to be working for me (I added the folder action, added pdfs to the folder and to subfolders to test). Is there a significant (30minute+) lag in importing a file?

One related question,

Is it possible to preserve the folder hierarchy of the folders you are syncing from?
i.e., import script added to Main Article folder and having the nested folders and pdfs show up in devonthink, as in the import function in devonthink, but synced to devonthink folders
If not, can I use Hazel, applscript, etc… to manually sync to devonthink folders in its database, and will the program pick up these documents?
Thanks for the help,

No, should be about instantaneous. Not sure why it’s not working. Maybe I’ll give it a whirl in a bit and see if I can figure it out. One problem is that if you download/print files into that folder, the action starts working from when the file first appears – not when the file is done transferring – so DEVONthink has time to try (and fail) importing the document before it’s necessarily through printing or downloading. That’s a problem with OS X, not DEVONthink.

I’ll see if I can figure it out later.

On your other questions, I have no idea :slight_smile: One feature I’ve begged for several times has been a transparent window onto specified areas of the filesystem – which would, if I understand you correctly, solve all of your problems.

I’d like to add my voice as another person who uses Folder Actions quite often, but has experienced absolutely no luck getting the Index Items script to do anything whatsoever with the Devonthink pb2.

I add the script to a Folder, where I would like the contents to be automatically index/synched with Devonthink when I drop something new into the folder and… then, nothing happens. I’ve tried it with DT launched, not launched, makes no difference, it appears to accomplish nothing whatsoever.

Is this thing working for anybody?

Nope.

Top of my list since I first started using DT has been a foolproof system for indexing files/folders and keeping them automatically sync’d. Change a file in an external app? The changes are sync’d. Add a file to, or remove one from a folder? Automatically sync’d.

But it has yet to happen…

This kind of thing and long delays worries me deeply, as a potential new DT user. I know once I jump in I will invest a lot of time/energy (far more than the cost of the software!) and am worried about the apparently slow development.

I have not had these same problems-in fact I am using Indexed folders in two different scenarios with no problems. In the first case, I have indexed ‘shared’ folders on two machines (work, home) via Dropbox. In the second, with the index script attached to Sente’s document folder, DT “watches” it for changes.

This is working for me in DTP2. (edit: if I’m understanding your problem correctly.) I have a folder with the attached action to import into DTP2. I normally am searching an academic journal and want to save the PDF from my web browser (safari) to DTP. I save it to the folder and if I have my DTP2 DB open it appears there without a problem.

(I haven’t figured out this whole inbox thing that’s supposed to catch imports if you don’t have a DB open.)

What you described is exactly what I would like to have happen. I want Devonthink to “watch” a folder and its sub-folders.

Could those of you for whom this is working, please pretend I’m retarded and explain to me what it is that you’re doing to get it to work?

  • I make a folder called “test”

  • I add the Action Index.scpt from DT Folder Action’s folder to this Folder.

  • I drop something into the folder. Nothing happens. Devonthink neither notices nor launches if it was closed.

Since there is no actual documentation I can find that lives inside the scripts folder, certainly no examples, I figure I’m doing something wrong, so I go to DevonThink, tell it to index the folder “test” which contains that folder action and then it indexes just fine. But of course it indexes just fine on any folder, with or without a folder action.

I add something to the folder called “test” which is now indexed into DT from within DT and the folder itself contains the Action Index.scpt attached to it and… nothing happens.

I’ve got nothing happens or nothing happens.

Finally just to be a thorough stupid person, I click Info to get info on the folder “test” which I have now manually indexed into Devonthink and among many other buttons, I see SCRIPT and Select button, aha I think! It wants me to attached the Action Index.scpt into that pane inside DT! That’ll be what makes it work and then… you know this part already, it proceeds to do absolutely nothing.

This whole process is neither intuitive or something that makes any sense to me at all. It took me about 5 minutes the first time to get the concept behind Folder Actions in OS/X and get it working for me. Having spent a frustrating half an hour trying to do the same thing with Devonthink, it hasn’t accomplished anything at all. It isn’t like there is a error message somewhere so I’d at least understand I did something wrong, there is just nothing happening in response to anything I try.

Is this not possible? Is this not what the Action Index.scpt inside the Devonthink extras, Folder Actions, folder is supposed to do?

The index droplet works just fine, I drop something on it, it gets indexed into the inbox. This is far too simplistic for me to be useful, but at least it works.

Any insight would be much appreciated.

All I want to do is: have a folder within the Finder, which is indexed into my Devonthink database. When material is added to that folder or its sub-folders, I would like for it to get “pushed” to Devonthink so those changes to the filesystem are reflected within the indexed contents of those directories inside Devonthink. I want Devonthink to “watch” a folder and its sub-folders.

It works just fine if I do this manually, index in the folder, and then click synchronize when I want to make sure Devonthink has the current contents… but call me insane, I don’t want to keep clicking synchronize on 20 different directories I want to index into Devonthink, instead of import, I just want what’s inside a indexed Devonthink directory to reflect the actually contents of the filesystem AT ALL TIMES, not the contents that were in there yesterday or the last time I synched.

I have the same sort work flow issue. I want to keep all of my files on the Mac in the usual OSX file folder hierarchy. And I want to keep duplicates in my DTpro database. Having them synchronized with the native files would be nice too. The DT folder action script provided works to copy the file into the inbox of DT, but there is no apparent synchronization. The folder action script does not seem to function on subfolders. I had to add the action to every subfolder as well as the parents. Once in the DT inbox, then additional work is necessary to file the desired folder within DT.

Folder action script works fine here and instantaneously to boot. It doesn’t seem to handle subfolders, though and drops indexed stuff only into DT’s inbox. I would love it if it gave me a choice and allowed subfolders as well.

kithairon

I’d like to chime in here with the little bit of experience I’ve had with the indexing folder action and Papers. For me, the folder action works whenever papers create a new folder (in my case for new author name since I have subfolders by author name), but not when it puts a PDF in one of the existing subfolders. It makes sense from the perspective of the folder action, but it would indeed be nice to have it work for subfolders as well.

I don’t know AppleScript well enough to write such a script, but it seems like it must be possible.

A workaround could be to add a folder action to each to the existing subfolders as well, which means you would have to go back periodically to out the folder action to existing folders.

Best, and thanks for this helpful discussion,
JC

I suspect you need to tell OSX to associate that script with that folder e.g. simplehelp.net/2007/01/30/fo … -examples/

I have not tested it.