I finally got aruond to re-exporting my subscriptions from NNW so that opml2html.pl (slightly modified to handle NNW output) can update my blogroll.

I've dropped a bunch of feeds that I really wasn't reading anyway and added a few new ones that I am reading.

On a related note, does anyone know how to automatically export my subscriptions from NNW and scp (or ftp?) them somewhere? Can AppleScript (about which I know nothing) do this? Can I do it in Perl and not have to learn Yet Another Scripting Language?

I'd just go figure all this stuff out, but I really don't have the time right now. Other things have priority.

Posted by jzawodn at February 28, 2003 05:16 PM

Reader Comments
# Andrew said:

AppleScript really is something worth learning. But if you're not going to take the effort of learning it, and you happen to already know how to parse XML in Perl, then you can use a Perl script to parse ~/Library/Preferences/com.ranchero.NetNewsWire.plist

If you need the DTD for the property list file, it can be found in /System/Library/DTDs/PropertyList.dtd

If you don't want to actually parse the XML, you can probably grep for URLs and look for surrounding context, but I'd not recommend that.

Also note that the format of the ~/Library/Preferences/com.ranchero.NetNewsWire.plist
may quite possibly change (it is bound to always be an XML file with that same DTD, but the various keys and locations within the dicts and stuff may change as the developer updates the application).

However, if you use AppleScript, it is highly unlikely that the developer will change the AppleScript API for interfacing with NetNewsWire, IMHO.

on February 28, 2003 06:57 PM
# Andrew said:

A clarification: NetNewsWire Lite is not scriptable. Only NetNewsWire Pro is scriptable. So unless you not only want to pay for the Pro version (which you could use to blog - I don't know if you've already paid or not), AND learn AppleScript, then you're left messing with the .plist file.

In AppleScript, you'd have to loop through the subscriptions, extract the relevant information, and write it to a file. It would be a pretty simple loop and getting the information wouldn't be difficult (accessor methods already defined), but I can understand that it is problematic to learn AppleScript the first time (it is much more like HyperTalk or the really old dialect of Lingo - before they made Lingo look like JavaScript/ActionScript).

on February 28, 2003 07:26 PM
# rentzsch said:
on February 28, 2003 08:22 PM
# Todd Larason said:

NNW's subscriptions are stored in ~/Library/Preferences/com.ranchero.NetNewsWire.plist .

I have perl/RE code to parse it as part of my blosxom blogroll plugin (http://molelog.molehill.org/blox/Computers/Internet/Web/Blogroll), which you're free to adapt, but if you're sure you're going to have an XML parsing library available, it's almost certainly both easier and preferable to do it that way.

on February 28, 2003 10:47 PM
# Richard Soderberg said:

Woot, glad to see progress on this front. Still hoping for NNW capability to automatically update this content on the server, tho.

on March 2, 2003 02:34 PM
# Emmanuel said:

Do you know UserTalk? Do you own a copy of Radio UserLand? If so, you might be interested by this:

http://blog.scriptdigital.com/index.php?entry=/RadioUserLand/Dev/nnw_createradioshortcuts.html

on March 2, 2003 02:58 PM
# noel said:

I wrote a script that works pretty well. http://noeljackson.com/code/nnw2opml/

on March 5, 2003 09:37 AM
Disclaimer: The opinions expressed here are mine and mine alone. My current, past, or previous employers are not responsible for what I write here, the comments left by others, or the photos I may share. If you have questions, please contact me. Also, I am not a journalist or reporter. Don't "pitch" me.

 

Privacy: I do not share or publish the email addresses or IP addresses of anyone posting a comment here without consent. However, I do reserve the right to remove comments that are spammy, off-topic, or otherwise unsuitable based on my comment policy. In a few cases, I may leave spammy comments but remove any URLs they contain.