Skip to content

Commit

Permalink
update main fn to use -d, --defs instead of --types
Browse files Browse the repository at this point in the history
  • Loading branch information
drmason13 committed Dec 29, 2023
1 parent 1dd4f7a commit 503e15c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ struct Cli {
#[arg(short, long)]
template: PathBuf,

/// path to a .csv file containing a type (can be specified multiple times to pull in multiple types) the type name will be the filename
#[arg(long)]
types: Vec<PathBuf>,
/// path to a .csv file containing a def (can be specified multiple times to pull in multiple defs) the def name will be the filename
#[arg(short, long)]
defs: Vec<PathBuf>,
}

fn main() -> anyhow::Result<()> {
let cli = Cli::parse();

let template = std::fs::read_to_string(&cli.template)?;

let definitions = Definition::from_csv_files(&cli.vars, &cli.types)?;
let definition = Definition::from_csv_files(&cli.vars, &cli.defs)?;

let popped = popvars::pop(&template, definitions)?;
let popped = popvars::pop(&template, definition)?;

#[cfg(windows)]
println!("{}", popped.join("\r\n"));
Expand Down

0 comments on commit 503e15c

Please sign in to comment.