Skip to content

Instantly share code, notes, and snippets.

@kalafut
Created June 19, 2014 23:19
Show Gist options
  • Save kalafut/9c597be84e0803843fff to your computer and use it in GitHub Desktop.
Save kalafut/9c597be84e0803843fff to your computer and use it in GitHub Desktop.
Retrieve bookmarks from Pindroid
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