Using ureq to download files
I might just throw out the TempFile thing - should actually save them somewhere. As I think it would likely be useful for testing too
This commit is contained in:
22
scryfall_deser/src/main.rs
Normal file
22
scryfall_deser/src/main.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use clap::Parser;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Args {
|
||||
#[arg(short, long)]
|
||||
update: bool,
|
||||
remainder: Vec<String>,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut 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);
|
||||
}
|
||||
Reference in New Issue
Block a user