Skip to content

Commit

Permalink
Rename argument to model-file from filename.
Browse files Browse the repository at this point in the history
Signed-off-by: James Goppert <james.goppert@gmail.com>
  • Loading branch information
jgoppert committed Jan 8, 2025
1 parent bcc9c8b commit 7c5fa06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ Type the following to test that rumoca is in your path.
$ rumoca --help
Rumoca Modelica Translator

Usage: rumoca [OPTIONS] --template-file <TEMPLATE_FILE> --filename <FILENAME>
Usage: rumoca [OPTIONS] --template-file <TEMPLATE_FILE> --model-file <MODEL_FILE>

Options:
-t, --template-file <TEMPLATE_FILE> The template
-f, --filename <FILENAME> The filename to compile
-m, --model-file <MODEL_FILE> The model file to compile
-v, --verbose Verbose output
-h, --help Print help
-V, --version Print version
Expand All @@ -116,7 +116,7 @@ This package uses the standard cargo conventions for rust.
cargo build
cargo run
cargo test
cargo run -- -t test/templates/casadi_sx.jinja -f test/models/integrator.mo
cargo run -- -t test/templates/casadi_sx.jinja -m test/models/integrator.mo
```

This package uses the standard cargo installation conventions.
Expand All @@ -142,7 +142,7 @@ end Integrator;

### Generated CasADi output file.
```bash
$ rumoca -t test/templates/casadi_sx.jinja -f test/models/integrator.mo
$ rumoca -t test/templates/casadi_sx.jinja -m test/models/integrator.mo
```
```python
import casadi as ca
Expand Down
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ struct Args {
#[arg(short, long)]
template_file: String,

/// The filename to compile
/// The model file to compile
#[arg(short, long)]
filename: String,
model_file: String,

/// Verbose output
#[arg(short, long, default_value_t = false)]
Expand All @@ -24,7 +24,7 @@ struct Args {

fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Args::parse();
let def = s1_parser::parse_file(&args.filename);
let def = s1_parser::parse_file(&args.model_file);
let mut flat_def = s2_analyzer::flatten(&def).expect("failed to flatten");

if args.verbose {
Expand Down

0 comments on commit 7c5fa06

Please sign in to comment.