Skip to content

Instantly share code, notes, and snippets.

@matax87
Created May 13, 2013 14:12
Show Gist options
  • Save matax87/5568593 to your computer and use it in GitHub Desktop.
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.
#!/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