Created
December 11, 2016 12:48
-
-
Save noqqe/98acc173dd19a7213b84a8cf15409c4d to your computer and use it in GitHub Desktop.
Instapaper to Pinboard Conversion Script
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/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