Scripts for NetNewsWire


I’ve been trying several scripts for NNW posted on the forum, but none seems to work. I’m looking for one that either:

  1. add a web archive from NNW to DTP
  2. add a (web) page from NNW to DTP
  3. add a url from NNW to DTP

The first two would be the best, but I can work around it with the last one.

Any help would be very appreciated.

– MJ

Ah, now I can use the new script that came with DTPO beta 2.

However, this only adds the ‘news item’, not the webpage opened in a tab. Is there any script that allows this?

– MJ


This script - lightly tested :slight_smile: - will create a web-archive of each open web tab in NetNewsWire (always presupposing these are pages not protected by authentication):

tell application "NetNewsWire"
		if number of tabs > 1 then
			set the_urls to URLs of tabs
			set the_titles to titles of tabs
			repeat with k from 2 to count the_urls
				set h_title to item k of the_titles
				set h_URL to item k of the_urls
				tell application "DEVONthink Pro"
					set h_archive to create record with {name:h_title, type:html, URL:h_URL}
					set data of h_archive to download web archive from h_URL
				end tell
			end repeat
		end if
	on error error_message number error_number
		if the error_number is not -128 then
				display alert "NetNewsWire" 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