From 95f45a98fa4db8820f07a160fddb98a3e83dbb9e Mon Sep 17 00:00:00 2001 From: The Magician Date: Tue, 17 Sep 2024 11:38:59 +0100 Subject: [PATCH] Fix compilation w.r.t. selectedStorageAreaName --- sevenkeys/cli/mainui.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sevenkeys/cli/mainui.go b/sevenkeys/cli/mainui.go index aac287c..7a9d743 100644 --- a/sevenkeys/cli/mainui.go +++ b/sevenkeys/cli/mainui.go @@ -4,10 +4,10 @@ import ( "database/sql" "errors" "fmt" - "os" "os/exec" "sevenkeys/database" "sevenkeys/logic" + "sevenkeys/manabox" ) var output string @@ -15,7 +15,7 @@ var output string func MainCliLoop(db *sql.DB) { var command string - var selectedStorageAreaName string + //var selectedStorageAreaName string var cardLocation database.CardLocation var insertSearchCriteria logic.SearchCriteria = logic.SearchCriteria{ @@ -36,7 +36,8 @@ func MainCliLoop(db *sql.DB) { for { ShowSplashScreen() - showStorageInfo(os.Stdout, selectedStorageAreaName) + // TODO: Fix this + //showStorageInfo(os.Stdout, selectedStorageAreaName) showInsertSearchCriteria(insertSearchCriteria) showSelectedCard() showCopiesInserted() @@ -59,10 +60,10 @@ func MainCliLoop(db *sql.DB) { options, err := logic.GetStorageAreaSearchOptions(db) logic.Check(err) - id, name, err := logic.GenericSearch(options) + id, _, err := logic.GenericSearch(options) logic.Check(err) - selectedStorageAreaName = name + //selectedStorageAreaName = name cardLocation.StorageAreaId = id break case "c", "criteria": @@ -95,6 +96,10 @@ func MainCliLoop(db *sql.DB) { logic.Check(err) copiesInserted++ break + case "m", "manabox": + filename := GetStringResponse("Filename:") + manabox.ParseManaboxExport(filename) + break case "l", "locate": filename := GetStringResponse("Filename:") cardNames, err := logic.GetCardNamesFromFile(filename)