Created
May 13, 2013 14:12
-
-
Save matax87/5568593 to your computer and use it in GitHub Desktop.
Use this script to export Instapaper unread list to Safari's Reading List.
Download your instapaper-export.csv from http://www.instapaper.com/u in the "Export CSV…" section on the right.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import csv | |
reader = csv.DictReader(open('./instapaper-export.csv', 'rb'), delimiter = ',', quotechar = '"') | |
unread = [] | |
for row in reader: | |
if ( ( row['Folder'] != 'Archive' ) and ( row['Folder'] != 'Starred' ) ): | |
unread.append(row['URL']) | |
for url in reversed(unread): | |
print("Adding: " + url) | |
os.system("""osascript -e 'tell application "Safari"' -e 'add reading list item \"""" + url + """"' -e 'end tell'""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment