Files
mini_projects/scryfall_deser/src/main.rs
Arthur Roberts 5dfdff17c1 Added the start of the db create
Need to do insert (obv), recall, search by name (get the whole name column), and
then display nicely.

Also renamed / used more correctly the "data" folder. I should use cache for
the downloaded .json file from scryfall though
2025-08-15 01:48:16 +01:00

26 lines
553 B
Rust

use clap::Parser;
use scryfall_deser::init_db;
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
#[arg(short, long)]
update: bool,
remainder: Vec<String>,
}
fn main() {
let args = Args::parse();
if args.update {
unimplemented!("Haven't implemented update yet");
}
let card_name = args.remainder;
if card_name.is_empty() {
panic!("You need to put some card text to search");
}
let search_string = card_name.join(" ");
dbg!(search_string);
init_db();
}