inessential by Brent Simmons

Subscribing to a site from within Safari

One of my favorite features of NetNewsWire is that it’s scriptable. There’s even a Scripts menu, so you can add your own commands as scripts.

Here’s a little two-line script that lets you subscribe in NetNewsWire to the frontmost window in Safari.

tell application "Safari" to set s to URL of document 1
tell application "NetNewsWire" to subscribe to s

It gets the URL of the front window in Safari, then it tells NetNewsWire to subscribe to that URL.

When NetNewsWire gets a subscribe command it automatically does RSS auto-discovery.

In other words, you could just be on the home page of a weblog in Safari, run this script, then NetNewsWire will (most often) find the RSS feed for that weblog. (If it exists, of course.)

You could put this script in NetNewsWire’s Scripts menu, or maybe put it in the global Script Menu, or even put it in the Dock.

And then there you have it, an easy way to subscribe to a site in NetNewsWire while you’re in Safari.

(By the way, you could probably modify the first line of this script to work with other browsers. It may not even need modification except for the name of the application.)