generated from OBJNULL/Dockerized-Rust
Created separate modes of running
This commit is contained in:
parent
cb4d151960
commit
977c9b5ce3
1 changed files with 33 additions and 15 deletions
|
@ -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
|
||||
*/
|
||||
.subcommand(
|
||||
Command::new("convert")
|
||||
.short_flag('c')
|
||||
.long_flag("convert")
|
||||
.about("Converts PDF Statements to CSV Files")
|
||||
.arg(
|
||||
Arg::new("file_in")
|
||||
.short('i')
|
||||
.long("file_in")
|
||||
.id("file_in")
|
||||
.help("The PDF you want to convert")
|
||||
.action(ArgAction::Set)
|
||||
.required(true),
|
||||
)
|
||||
.arg(
|
||||
Arg::new("file_out")
|
||||
.short('o')
|
||||
.long("file_out")
|
||||
.id("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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue