diff --git a/project/src/args.rs b/project/src/args.rs index 49e4f0c..1a49a2f 100644 --- a/project/src/args.rs +++ b/project/src/args.rs @@ -15,25 +15,43 @@ impl Arguments { let matches = Command::new("statement-converter") .about("A service that converts Bank Statement PDF files into CSV files") .version("1.0.0") + .subcommand_required(true) .arg_required_else_help(true) /* - PDF Path + -- Convert Mode */ - .arg( - Arg::new("file_in") - .short('i') - .long("file_in") - .help("The PDF you want to convert") - .action(ArgAction::Set) - .required(true), + .subcommand( + Command::new("convert") + .short_flag('c') + .long_flag("convert") + .about("Converts PDF Statements to CSV Files") + .arg( + Arg::new("file_in") + .id("file_in") + .help("The PDF you want to convert") + .action(ArgAction::Set) + .required(true), + ) + .arg( + Arg::new("file_out") + .id("file_out") + .help("The CSV Path you want to save to") + .action(ArgAction::Set) + .required(true), + ), ) - .arg( - Arg::new("file_out") - .short('o') - .long("file_out") - .help("The CSV Path you want to save to") - .action(ArgAction::Set) - .required(true), + .subcommand( + Command::new("package") + .short_flag('p') + .long_flag("package") + .about("Combines all CSV Files in a given directory into one MASSIVE one") + .arg( + Arg::new("directory") + .id("directory") + .help("The path where your CSV files are") + .action(ArgAction::Set) + .required(true), + ), ) .get_matches();