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
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.
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).
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.
Woot, glad to see progress on this front. Still hoping for NNW capability to automatically update this content on the server, tho.
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
I wrote a script that works pretty well. http://noeljackson.com/code/nnw2opml/