mirror of
https://github.com/correl/mtgsqlive.git
synced 2024-12-01 03:00:09 +00:00
add database / update readme
This commit is contained in:
parent
a677b27b30
commit
0422915c17
4 changed files with 7 additions and 3 deletions
BIN
Magic Database Complete2016-07-13 17:57:16.847253.db
Normal file
BIN
Magic Database Complete2016-07-13 17:57:16.847253.db
Normal file
Binary file not shown.
|
@ -1,3 +1,7 @@
|
|||
# MTG-Livetime-Database
|
||||
|
||||
[![Join the chat at https://gitter.im/ZeldaZach/MTG-Livetime-Database](https://badges.gitter.im/ZeldaZach/MTG-Livetime-Database.svg)](https://gitter.im/ZeldaZach/MTG-Livetime-Database?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![Join the chat at https://gitter.im/ZeldaZach/MTG-Livetime-Database](https://badges.gitter.im/ZeldaZach/MTG-Livetime-Database.svg)](https://gitter.im/ZeldaZach/MTG-Livetime-Database?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
This project uses the [MTGJSON](www.mtgjson.com) files to create a SQLite database with all relevant data for Magic: The Gathering.
|
||||
|
||||
This database can be easily updated / pulled from the repo for projects that need to use a database of the cards and don't have a way to parse the JSON files themselves.
|
|
@ -5,7 +5,7 @@ import datetime
|
|||
import os
|
||||
|
||||
JSON_FILE = input("Where is the \"AllSets-x.json\" file you'd like to import?\n> ") #Input filename via command line
|
||||
DB_FILE = "Magic Database Complete" + str(datetime.datetime.now()) + ".db"
|
||||
DB_FILE = "Magic Database Complete " + str(datetime.datetime.now()) + ".db"
|
||||
|
||||
# Get the value of the card, return None if NULL
|
||||
def getVal(data, field):
|
||||
|
|
|
@ -5,7 +5,7 @@ import datetime
|
|||
import os
|
||||
|
||||
JSON_FILE = input("Where is the single set JSON file you'd like to import?\n> ") #Input filename via command line
|
||||
DB_FILE = "Magic Database Single Set" + str(datetime.datetime.now()) + ".db"
|
||||
DB_FILE = "Magic Database Single Set " + str(datetime.datetime.now()) + ".db"
|
||||
|
||||
traffic = json.load(open(JSON_FILE))
|
||||
conn = sqlite3.connect(DB_FILE)
|
||||
|
|
Loading…
Reference in a new issue