Scenarios for Efficiently Getting Pages into DT

I’m posting this to see if anyone had developed any solutions for capturing pages and getting them filed in DT. I’m looking for ways to improve the following process:

Consider the case of pages from newspapers. Within the San Jose Mercury News I can select a page, click on the “print this” link to reduce the amount of “noise”.
Then use a keyboard shortcut to activate the applescript “add page from Safari” in DT.
Finally I use the classify process to file the page appropriately.

I’m trying to improve the steps to capture the page at the begining of this process.
It occurs to me that it might be possible to write a script to extract the “print this” link so that one could create a script that put the “print this” version into DT directly.
In addition I wonder if specific scripts could be used to target documents into target groups to avoid having to manually classify documents. (Note:my success with autoclassification is mixed so I’m reluctant to rely on the built in automatic approach.)

Has anyone developed any solutions of a similar nature or does anyone have any creative ideas on reducing the time and keystrokes required to collect and file information for DT.

I’d appreciate hearing any thoughts.

Regards

Richard Bullen

Richard,

a possible solution might look like this:


-- Add print version from Safari
-- Created by Christian Grunenberg on Fri Jan 06 2005.

tell application "Safari"
	try
		if not (exists document 1) then error "No document is open."
		
		set this_url to the URL of document 1
		set this_source to the source of document 1
		set this_title to the name of window 1
		
		tell application "DEVONthink Pro"
			set these_links to get links of this_source containing "Print this" base URL this_url
			if these_links is {} then error "No printable version found."
			set this_url to item 1 of these_links
			set this_source to download markup from this_url
			create record with {name:this_title, type:html, URL:this_url, source:this_source}
		end tell
	on error error_message number error_number
		if the error_number is not -128 then
			try
				display alert "Safari" message error_message as warning
			on error number error_number
				if error_number is -1708 then display dialog error_message buttons {"OK"} default button 1
			end try
		end if
	end try
end tell

Note: The “containing” argument might need a different string and is currently case insensitive (contrary to the description in the script suite). This will be fixed in V1.1.