Rename commands and clean up filename code

This commit is contained in:
The Magician 2025-03-25 11:58:37 +00:00
parent 0a52dde4f6
commit 556ef2dd78
1 changed files with 6 additions and 3 deletions

View File

@ -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: