Import From Instapaper via NetNewsWire

Summary: Imports unread articles from Instapaper or another feed in NetNewsWire.
Requires: NetNewsWire 5
Install Location: ~/Library/Scripts/Applications/NetNewsWire/
Last Modified: 2022-05-02

Description

This script imports all the unread articles from an RSS feed in NetNewsWire, then marks them as read so they aren’t re-imported the next time you run the script.

You can use this to easily import articles that you’ve saved to Instapaper.

Go to your Instapaper in Safari, either the main Unread view or a particular folder. You can either find the RSS feed URL by reading the page’s source or by using the Subscribe to Feed extension. This should create a subscription for it in NetNewsWire.

Installation Instructions · Download in Compiled Format · Download in Text Format

Script

tell application id "com.ranchero.NetNewsWire-Evergreen"
    
-- Enter your Instapaper feed's URL here. It may be something like:
    
-- https://www.instapaper.com/rss/12345/abcdef
    
set _instapaperURL to "http://www.instapaper.com/"
    
set _feed to first webFeed whose url starts with _instapaperURL
    
set _articles to _feed's articles
    
repeat with _article in _articles
        
tell _article
            
if not read then
                
my importURL(url)
                
set read to true
            
end if
        
end tell
    
end repeat
end tell

on importURL(_url)
    
tell application "EagleFiler"
        
-- Import one URL at a time so we can mark read only the ones that successfully imported.
        
        
-- 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 importURL