I [gavin19] also wrote this very simple Python script that can take a Chrome chrome-extension_kbm..localstorage file as input and output to the Firefox store.json type. Just copy the old Chrome settings file to the same directory as the script and rename to res.db. Running python chrToFF.py should output a valid Firefox-worthy replica.
Last active
December 11, 2021 06:24
-
-
Save jewel-andraia/9294509 to your computer and use it in GitHub Desktop.
@gavin19's RES settings backup script
This file contains hidden or 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 codecs | |
import sqlite3 as sq | |
con = sq.connect('res.db') | |
cur = con.cursor() | |
db = cur.execute('SELECT key, CAST(value as TEXT) FROM ItemTable').fetchall() | |
with codecs.open('store.json', 'w', 'utf-8') as f: | |
dump = json.dumps(dict(db)) | |
f.write(dump) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Going the other way around I assume would be just as simple, in that your parsing through the JSON file and then creating a SQLite dump? I I may fork this and attempt it myself as I want to go FF-Chrome instead of the other way around.