Newbie Help Required (sorry!)

Hi all, I have been playing with DTP with the thought of going paperless for home. I’m loving it and so have popped out and bought a Cannon LiDE 60 - which seems great. I have done a test scan to PDF and opened it DTP which worked great (and text searchable which I guess means it has been OCRd automatically?). Now what would be great would be:

If I scan to PDF and save it to a folder can it automatically get imported into DTP? I have enabled folder actions on my folder but can’t see a script to add it to DTP?
Also, most of the things being scanned (bills etc) I want to import into a group called sort or incoming, but some might have common words (i.e. my bank name) so would want them to automatically go into a group. Is that possible via DTP and AI?

Any help and info much appreciated. I have had a search in the forums but could not see anything - apologies if it is there already.

Thanks,

Chris

When you installed DT Pro two simple Folder Action scripts should have been installed; Boot Volume (default name is Macintosh HD) Library > Scripts > Folder Action Scripts/. Look in that location for these two scripts:

  • Action Import.scpt
  • Action Index.scpt

The first script, when attached to a folder, will automatically Import to DT Pro files added to the folder.

The second script, when attached to a folder, will automatically Index to DT Pro files added to the folder.

The files will be saved to your top-most view of your database. If you wish, you can examine some to the sample scripts posted in the Scripting topic on the Forum to modify the scripts to either send the added content to a specific group, or to query you for the location each time a file is added.

In the Finder, click on Help > Mac Help and search for Folder Action for instructions on how to enable a Folder Action script.

You might also consider using the Groups panel to add content to any desired group in your database.

How to use the Groups panel:

[1] In DT Pro Preferences > General Interface: Make sure that the option Hide “Groups” panel when inactive is not checked.

[2] Select Tools > Show Groups. Move the panel to the right side of your screen, then minimize it to the Dock. It will then be available as a floating panel in any application when you click on the icon in the Dock.

[3] In the Finder, select one or more files that you would like to capture to your database. Click on the Groups icon in the Dock to make it available.

[4] To Import (copy) the selected file(s) to your database, simply drag the selected file(s) to the desired group in the Groups panel and release (drop) the file(s).

[5] To Index (link) the selected files, do a Command-Option-Drag & Drop of the selected file(s) to the desired location in the Groups panel.

When finished, minimize the Groups panel back to the Dock.

Tip: If you are going to drag a file to a subgroup, click on the triangle symbol of the enclosing group first, to make it easier to ‘hit’ the desired location.

Thanks Bill for the reply - I thought it would be something simple like that.

I have had a look and the scripts are missing. I’ve looked in my local and system-wide library folders but the 2 scripts are not there (also spotlighted for them). I have installed the Add-ons as DevonPro is available in the Services menu etc. I will open up the DMG and see if they are in there. I guess if they are then it is just a case of copying into the scripts folder?

I will also try your little trick for the floating Groups window - nice.

What about the AI element? Do many people use it and if so how successful? How do you configure it?

Thanks again,

Chris

OK - the script is added after grabbing it from the dmg.

I created a new group in DTP and chose MOVE TO > TOP Group so now I have a folder called ‘To Do’. When I drop a file in the folder the action script kicks in and the file is added into DTP but not into the To Do folder? Any ideas?

Thanks,

Chris

I’m not an expert on AppleScript, but I made a few changes to the Action Import script that seem to work for me. It was patched together from two different scripts. Maybe someone with more knowledge can clean it up, but it seems to be working okay as is. Try this:

-- Action Import.applescript
-- DevonThink Pro
-- Created by Christian Grunenberg on Tue Dec 03 2002.
-- Copyright (c) 2002-2005. All rights reserved.
property pDestinationGroup : "/#ToDo"

on adding folder items to this_folder after receiving added_items
	try
		tell application "DEVONthink Pro" to launch
		tell application "DEVONthink Pro" to set incomingGroup to create location pDestinationGroup
		repeat with theItem in every item of added_items
			try
				set thePath to theItem as text
				if thePath does not end with ".download:" then
					tell application "DEVONthink Pro" to import thePath to incomingGroup
				end if
			end try
		end repeat
	end try
end adding folder items to

The “#” before the “ToDo” sorts the “#ToDo” group at the top of the list.
Karen

Thanks Karen - I will give this a go when I’m home later. Looks just the thing though.

:smiley:

Chris

OK - this is working great now - thanks for your help.

Looks like I need to do some serious scanning now and part with some cash!

One extra query (which I will post on the scripts section also)…

How would the script be modified so that it ignored files ending in p2p in the folder? I’m using foldersync so I can scan on one machine and the files appear on my mac via auto-sync but whilst they get transferred they have the extension filename.pdf.p2p

Any ideas?

Thanks,

Chris

Chris,

Thanks for asking these questions as you’ve prompted me to figure this out and I’ve learned a lot in the process!

Karen

Give this a try…

-- Action Import.applescript
-- DevonThink Pro
-- Created by Christian Grunenberg on Tue Dec 03 2002.
-- Copyright (c) 2002-2005. All rights reserved.
-- Modified by Karen Buckland on Wed Aug 02 2006.
property pDestinationGroup : "/#ToDo"

on adding folder items to this_folder after receiving added_items
	try
		tell application "DEVONthink Pro" to launch
		tell application "DEVONthink Pro" to set incomingGroup to create location pDestinationGroup
		repeat with theItem in every item of added_items
			try
				set thePath to theItem as text
				if thePath does not end with ".download" then
					if thePath does not end with ".p2p" then
						tell application "DEVONthink Pro" to import thePath to incomingGroup
					end if
				end if
			end try
		end repeat
	end try
end adding folder items to

Well thanks very much for sorting a solution - it works a treat…I now have a great syncing solution across the WWW or home-network which when ready adds to Devon for my perusal!

Nice one

:smiley:

That’s what the Forum is for – mutual assistance. You tapped into help from some kind and knowledgeable people. :slight_smile:

And now you’ll be able to help the next person with a similar request.

Early on you asked if the AI features need to be configured. The answer is no. “Classify” can help you place new content into your database’s organizational structure. This AI procedure “looks” at your new document and compares the contextual relationships within it to the contextual relationships of the contents of groups in your database. The better you have placed related content into groups, the more effective this procedure will be – and it will tend to get better as your database grows.

Think of the Classification procedure as a dynamic interaction between yourself and DT Pro. When you view a document and click on the Classify button, DT Pro will suggest possible group locations for that document. The “most likely” suggestion(s) may be already selected, so that the document is moved (or replicated, if to more than one group) when you click the Move button.

But suppose you reject DT Pro’s top suggestion and instead select the fourth group in the list and click the Move button. This has the effect of modifying the pattern of contextual relationships in the group that you selected. So the next time a similar document is classified, DT Pro will be more likely to recommend the group that you had selected for that kind of content.

The more consistently you make classification decisions, the more likely you will be pleased with future recommendations by DT Pro. At some point you may decide to turn on the Auto-Classify option for location of new content. Note that DT Pro may not classify all new content even if Auto-Classify is turned on; it may “punt” to you for decisions if it can’t find a suitable group for some of your documents.

Tip: If you have a group that holds material not yet classified, or perhaps one that was created for a purpose other than organizing your content by context you should open the Info panel for that group and check the option to exclude it from classification recommendations.

Is the “Exclude from Classification” setting for a group recursive? That is, if I exclude a group from classification, are all of its sub-groups also excluded from classification?

Based on a quick experiment, it appears that sub-groups of an excluded group are not themselves excluded from classification; but I wanted to double-check with some experts here. :wink:

No, subgroups are not excluded (as groups might have multiple parents and therefore the setting would be undefined).