DT and NetNewsWire

I recently posted the follwing request at NNW’s forum

" There is only one thing I am still missing. I often save articles from NNW to an application called DevonThink. When I Highlight and save a text in Safari I automatically get the URL copied into my database, with NNW not."

I got the answer that this probably is something that Devon has to fix in it’s Services. Is that so, and can I hope for a fix in coming editions? From the discussion on the NNW forum I understood that there are many others that use the two programs the way I do.

You may (or may not) have discovered that NNW is not a cocoa application.

I deal with this everyday, and I just drag the url from NNW to DT and do my clipping there. I just live with it.

It’s been discussed on this forum before and I could be wrong but believe that unless and until NNW becomes cocoa, it ain’t gonna work.

You can also see that NNW isn’t cocoa if you use somethng like maximice, which can’t autoscroll in non cocoa apps.

There is a very cool applescript that allows you to automagically import the feed’s contents from NNW to DT though and it works great. Right now I don’t remember where I got it, but will poke around and post where it is if someone doesn’t beat me to it.

Ehhh, from the developers web page “NetNewsWire. More news, less junk. Faster. The Cocoa RSS newsreader keeps you up-to-date with less wear and tear on your browser.”

Well, it’s not, or it’s not fully. Because some of the other cocoa services have ever worked in NNW.

But that may not be the issue anyway. Here’s where this has been discussed here before:

devon-technologies.com/phpBB … etnewswire

devon-technologies.com/phpBB … etnewswire

NetNewsWire is not making the URL and/or other information available to OS Services at this time. You might contact them and ask iƒ they can do this. If they are using Cocoa, it might be possible.” – Bill DeVille

Would do you mean with fully? and why? Do you base your claim on the fact that NNW doesn’t implement all the stuff that available in Cocoas libraries? Or do you know something more?

I’m sorry, I don’t mean to get into a flame war. I love NNW, I’m using the latest beta, have used it from the very beginning, and am thrilled with the improvements upcoming in this release. All I know is that it doesn’t behave at all like every other cocoa app in regard to some prefpanes like maximice, which I rely on greatly in other cocoa apps. So as I said, I’m not sure if this is the reason it doesn’t cooperate with DT, but I live with it and am not too ‘put out’ in doing that. No biggie.

The forum administrator at NewsGator (NetNewsWire) Brent Simmons today gzve the following answer in a thread about the same subject in their forum:

“If the DevonThink developers want to contact me about adding some scriptability or whatever they might need, I encourage them to do so. Nothing makes me happier than when different applications can work together”.

newsgator.com/forum/shwmessa … geID=16947

Any takers?

I’ve sent an email to Newsgator and hopefully the next release of DT will support NetNewsWire.

By the way, there’s nothing wrong with the services of DT - since V1.0 DT tries to grab both the note and the URL. But actually I’ve never seen an application or browser providing both (!) the note and the URL to services.

Therefore DT implements some AppleScript based workarounds for common browsers & email clients but NetNewsWire is not (yet) part of this.

Christian,
thank you. I know you have managed to work around the problem with Safari, so I’m confident that you’ll do an equally excellent work with NNW :laughing:

In the mean time, those who want to have url info of selected text in NNW could use a little applescript. Put the following script in ~/Library/Scripts/Applications/NetNewsWire. Do not assign a hot key for this. Just run it from script menu.


-- Add Selection to DT, for NetNewsWire and DEVONthink Pro
--
-- NetNewsWire code coming from Daniel Jalkut
--  http://www.red-sweater.com/blog/49/save-to-delicious
--
-- Specify your default incoming group name
property pDestinationGroup : "/incoming"

tell application "NetNewsWire"
	activate
	set savedURL to ""
	set savedTitle to ""
	set userTab to (index of selected tab)
	if (userTab is greater than 0) then
		set tabURLs to (URLs of tabs)
		set tabTitles to (titles of tabs)
		try
			set savedURL to (item (userTab + 1) of tabURLs)
			set savedTitle to (item (userTab + 1) of tabTitles)
		end try
	else
		set myHeadline to ""
		set myHeadline to selectedHeadline
		if (isFake of myHeadline) is equal to false then
			set savedURL to URL of myHeadline
			set savedTitle to title of myHeadline
		end if
	end if
	
	tell application "System Events"
		keystroke "c" using {command down}
		delay 1
		tell application "DEVONthink Pro"
			set incomingGroup to create location pDestinationGroup
			set newRecord to paste clipboard to incomingGroup
			set URL of newRecord to savedURL
			set name of newRecord to savedTitle
		end tell
	end tell
	
end tell

Select some text in NNW. The script will grab a correct url info whether you’re in the article list or in built-in browser.

Brent already answered my request and therefore the Take Note services of the next release will get the URL from NetNewsWire.

Glad to hear that. Can’t beat Take Note services. Will it fetch the title info too, if it’s available?

No, the take note services will work like in other applications and only get the URL.

That is fine. It’s still a great news. Thanks for the quick reply.

Well, outstanding. After all this time, once Christian gets involved, worlds move.

I’m still on NNWb28, but I’ll hold my breath for b34, but even if it’s later than that at least it’s in the pipeline.

Thank you Christian, and apologies for my wacky misdirection earlier in this thread.

The next release of DN/DT, not the next beta of NNW :slight_smile:

MAN! I don’t believe I’ve ever been such a dufus on a thread. I think I’ll just go take a nap. Maybe I’ll get the cobwebs out.

Well you rock anyway, Christian.

Great!

This script is great, but does anyone have an idea how it could be made to work with mutliple selections, or a whole folder of articles?

It seems that NNW doesn’t support multiple selections… but maybe on a folder basis?

Thanks!

This script imports the headlines and URLs from all open NetNewsWire tabs, then assembles them in a list of clickable links (ie on an html page):

--SAVE NETNEWSWIRE TABS 
tell application "NetNewsWire" 
   set titleList to titles of tabs 
   set urlList to URLs of tabs 
   set tabComp to "" 
   repeat with i from 2 to the count of titleList 
      set tabData to "<a href='" & item i of urlList & "' target='_blank'>" & item i of titleList & "</a>
" & "[" & item i of urlList & "]" & "

" 
      set tabComp to tabComp & tabData 
   end repeat 
end tell 
tell application "DEVONthink Pro" 
   set inGroup to create location "/IN BOX" 
   create record with {name:"NetNewsWire Tabs", type:html, source:tabComp} in inGroup 
end tell]