Created separate modes of running

This commit is contained in:
Maddox Werts 2025-04-18 18:16:42 -04:00
parent cb4d151960
commit 977c9b5ce3

View file

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