Created
June 19, 2014 23:19
-
-
Save kalafut/9c597be84e0803843fff to your computer and use it in GitHub Desktop.
Retrieve bookmarks from Pindroid
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
import json | |
import sqlite3 | |
output = [] | |
conn = sqlite3.connect('PinboardBookmarks.db') | |
c = conn.cursor() | |
for row in c.execute("SELECT url, description, tags FROM bookmark"): | |
output.append({"href": row[0], "description": row[1], "tags": row[2]}) | |
with open("PinboardBookmarks.json", "w") as f: | |
json.dump(output, f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment