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
26 lines
553 B
Rust
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();
|
|
}
|