Created
June 1, 2014 11:18
-
-
Save martinmev/444619fbdec82864a025 to your computer and use it in GitHub Desktop.
Export contacts from Nokia Suite
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 sqlite3 | |
import json | |
conn = sqlite3.connect('c:\\Users\\Martin\\AppData\\Local\\Nokia\\Nokia Data Store\\DataBase\\MDataStore.db3') | |
data = {} | |
cursor = conn.execute("select * from contact") | |
rows = cursor.fetchall() | |
getRowData = lambda r : ' '.join([x if x else '' for x in r]).strip() | |
for row in rows: | |
data[getRowData(row[1:6])] = getRowData(row[6:-1]) | |
cursor.close() | |
print(json.dumps(data, ensure_ascii=False)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment