diff --git a/sevenkeys/main.go b/sevenkeys/main.go index d0c9f5f..025617e 100644 --- a/sevenkeys/main.go +++ b/sevenkeys/main.go @@ -15,7 +15,7 @@ import ( const ( UpdateSubcommand string = "update" - CreateStorageAreaSubcommand string = "createstorage" + CreateStorageAreaSubcommand string = "create-storage" StoreSubcommand string = "store" ImportSubcommand string = "import" SearchPrintingsSubcommand string = "search-printings" @@ -81,9 +81,10 @@ func main() { fmt.Printf("%d\n", cardLocationId) break + case ImportSubcommand: importCmd := flag.NewFlagSet(ImportSubcommand, flag.ExitOnError) - storageArea := importCmd.String("storagearea", "", + storageArea := importCmd.String("storage-area", "", "The name of the StorageArea where cards should be imported.") importCmd.Parse(flag.Args()[1:]) @@ -95,12 +96,14 @@ func main() { } logic.Check(err) - delverLensCards, err := delverlens.ParseExportFile(importCmd.Args()[0]) + filename := importCmd.Args()[0] + delverLensCards, err := delverlens.ParseExportFile(filename) logic.Check(err) err = logic.ImportDelverLensCards(db, delverLensCards, storageAreaId) logic.Check(err) break + /* TODO: Rewrite this to search Blueprints case SearchPrintingsSubcommand: