mirror of
https://github.com/correl/mtgsqlive.git
synced 2024-12-01 03:00:09 +00:00
Fix query
This commit is contained in:
parent
e69081e1c0
commit
cc120af68a
1 changed files with 4 additions and 4 deletions
|
@ -17,7 +17,7 @@ def remove_empty_keys(d):
|
|||
def db_to_json(database_connection):
|
||||
database_connection.row_factory = sqlite3.Row # Enable keys for the rows
|
||||
cursor = database_connection.cursor()
|
||||
cursor.execute("SELECT DISTINCT setCode from cards LIMIT 15 OFFSET " + sys.argv[1])
|
||||
cursor.execute("SELECT DISTINCT setCode from cards")
|
||||
|
||||
mainDict = {}
|
||||
returnData = []
|
||||
|
@ -38,11 +38,11 @@ def db_to_json(database_connection):
|
|||
return mainDict
|
||||
|
||||
def main():
|
||||
d = os.path.join(os.path.expanduser(sys.argv[2]), "Magic DB.db")
|
||||
d = os.path.join(os.path.expanduser(sys.argv[1]), "Magic DB.db")
|
||||
d = sqlite3.connect(d)
|
||||
|
||||
xml = os.path.join(os.path.expanduser(sys.argv[3]), "Output.tmp.json")
|
||||
xml2 = os.path.join(os.path.expanduser(sys.argv[3]), "Output.json")
|
||||
xml = os.path.join(os.path.expanduser(sys.argv[2]), "Output.tmp.json")
|
||||
xml2 = os.path.join(os.path.expanduser(sys.argv[2]), "Output.json")
|
||||
|
||||
json_code = json.dumps(db_to_json(d), sort_keys=True, indent=2)
|
||||
|
||||
|
|
Loading…
Reference in a new issue