Skip to content

Instantly share code, notes, and snippets.

@noqqe
Created December 11, 2016 12:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noqqe/98acc173dd19a7213b84a8cf15409c4d to your computer and use it in GitHub Desktop.
Save noqqe/98acc173dd19a7213b84a8cf15409c4d to your computer and use it in GitHub Desktop.
Instapaper to Pinboard Conversion Script
#!/usr/bin/env python2.7
import json
from datetime import datetime
import csv
l = csv.reader(open('instapaper-export.csv','rb'), delimiter=',')
pins = []
for link in l:
# Items in unread folder to be read in pinboard
if link[3] == "Unread":
toread = "yes"
else:
toread = "no"
pin = {
"href": link[0],
"description": link[1],
"extended":"",
"time": datetime.now().isoformat(), # NO DATE EXPORT?! ARE YOU KIDDING ME INSTAPAPER?
"shared":"no",
"toread": toread,
"tags": link[3],
}
pins.append(pin)
print json.dumps(pins)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment