Skip to content

Instantly share code, notes, and snippets.

@bgw
Created March 29, 2011 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgw/893542 to your computer and use it in GitHub Desktop.
Save bgw/893542 to your computer and use it in GitHub Desktop.
Updates a botguy-ng experimental database file from the old shove-based format to the new sqlite3-based format
# Python 2 or 3
# Updates a botguy-ng experimental database file from the old shove-based format
# to the new sqlite3-based format
from bot import database
import pickle
p = pickle.load(open("botguy_info.db/userdef"))
db_manager = database.Database("botguy_info_converted.db")
db = db_manager.register_plugin("userdef", "shelf")
for i in p:
db[i] = p[i]
db_manager.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment