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
*/ */
.subcommand(
Command::new("convert")
.short_flag('c')
.long_flag("convert")
.about("Converts PDF Statements to CSV Files")
.arg( .arg(
Arg::new("file_in") Arg::new("file_in")
.short('i') .id("file_in")
.long("file_in")
.help("The PDF you want to convert") .help("The PDF you want to convert")
.action(ArgAction::Set) .action(ArgAction::Set)
.required(true), .required(true),
) )
.arg( .arg(
Arg::new("file_out") Arg::new("file_out")
.short('o') .id("file_out")
.long("file_out")
.help("The CSV Path you want to save to") .help("The CSV Path you want to save to")
.action(ArgAction::Set) .action(ArgAction::Set)
.required(true), .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(); .get_matches();