Rename commands and clean up filename code
This commit is contained in:
parent
0a52dde4f6
commit
556ef2dd78
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue