Seaching card by name works

This commit is contained in:
2025-08-17 01:08:27 +01:00
parent 9a9f42bc1e
commit 9f03e3e11f
3 changed files with 44 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
use clap::Parser;
use scryfall_deser::get_all_lowercase_card_names;
use scryfall_deser::get_card_by_name;
use scryfall_deser::get_local_cache_folder;
use scryfall_deser::init_db;
use scryfall_deser::update_db_with_file;
@@ -18,7 +19,7 @@ fn main() {
if args.update {
init_db();
let mut path = get_local_cache_folder();
// TODO - actually download and update
// TODO - actually download the file - probably do away with TempFile stuff
path.push("oracle-cards-20250814210711.json");
update_db_with_file(path);
return;
@@ -41,4 +42,6 @@ fn main() {
// Do some distance checking stuff
}
//dbg!(matching_cards);
let card = get_card_by_name("Black Lotus");
dbg!(card);
}