TheMathemagicians/sevenkeys/cmd/importdata/main.go

31 lines
474 B
Go

package main
import (
"database/sql"
"log"
"sevenkeys/database"
"sevenkeys/scryfall"
)
func importSets(db *sql.DB) {
setList, err := scryfall.GetSets()
if err != nil {
log.Fatal(err)
}
err = database.InsertSets(db, setList)
if err != nil {
log.Fatal(err)
}
}
func main() {
db := database.GetDatabaseFromConfig("config.json")
importColors(db)
importSets(db)
// Import keywords
// Import formats
// Import artists
// Import gamepieces and printings
}