Import From Instapaper via NetNewsWire
Summary: Imports unread articles from your Instapaper subscription in NetNewsWire.
Requires: Instapaper, NetNewsWire
Install Location: ~/Library/Scripts/Applications/NetNewsWire/
Description
Go to your Instapaper in Safari, either the main Unread view or a particular folder. Click the RSS button. (With Safari 6 you would need to install Subscribe to Feed.) This should create a subscription for it in NetNewsWire. When you run this script, EagleFiler will import any unread articles from that subscription. It will then mark them as read in NetNewsWire, so they aren’t re-imported the next time you run the script.
Download in Compiled Format · Download in Text Format
Script
tell application "NetNewsWire"
-- If you have only one Instapaper subscription in NetNewsWire:
set _instapaperURL to "http://www.instapaper.com/u"
-- If you have more than one, specify your folder URL:
-- set _instapaperURL to "http://www.instapaper.com/u/folder/42/eaglefiler"
set _feed to first subscription whose home URL starts with _instapaperURL
-- Or, to import the selected feed (works for any feed, not just Instapaper):
-- set _feed to selectedSubscription
set _headlines to _feed's headlines
repeat with _headline in _headlines
tell _headline
if not isRead then
my importURL(URL)
set isRead to true
end if
end tell
end repeat
end tell
on importURL(_url)
tell application "EagleFiler"
-- To import using the format currently chosen in the preference:
import URLs {_url}
-- You can also specify a particular format:
-- import URLs {_url} Web page format Web archive format
end tell
end importURLLast Modified: 2012-09-18
Running the Script
You can use AppleScript Editor (AppleScript Utility prior to Mac OS X 10.6) to enable Mac OS X’s built-in Script menu. To run the script, just select it from the menu. FastScripts provides a similar menu that supports keyboard shortcuts and other features.