Browse Source

Update readme file

Kevin Lee 5 months ago
parent
commit
8db860afbd
2 changed files with 50 additions and 9 deletions
  1. 49 8
      README.md
  2. 1 1
      src/ezcad/objects/mod.rs

+ 49 - 8
README.md

@@ -11,21 +11,62 @@ TODO:
 ## Usage
 
 ``` text
-Usage: minilase.exe [OPTIONS] --input <INPUT>
+Usage: minilase.exe [OPTIONS] --input <INPUT> <COMMAND>
+
+Commands:
+  diff   Diff two .mlp files and print differences between the two
+  query  Queries input .mlp file for pen or object info
+  apply  Applies configuration YAML to input .mlp file
+  help   Print this message or the help of the given subcommand(s)
+
+Options:
+  -i, --input <INPUT>  Input .mlp file to parse
+  -v, --verbose...     Increase logging verbosity
+  -q, --quiet...       Decrease logging verbosity
+  -h, --help           Print help
+```
+
+### Sub-Commands
+
+Diff two .mlp files and print differences between the two
+
+``` text
+Usage: minilase.exe --input <INPUT> diff [OPTIONS] --diff-file <DIFF_FILE>
+
+Options:
+  -d, --diff-file <DIFF_FILE>  File to diff input against
+  -v, --verbose...             Increase logging verbosity
+  -q, --quiet...               Decrease logging verbosity
+  -h, --help                   Print help
+```
+
+Queries input .mlp file for pen or object info
+
+``` text
+Usage: minilase.exe --input <INPUT> query [OPTIONS]
 
 Options:
-  -i, --input <INPUT>                Input file to parse
-  -d, --diff <DIFF>                  File to diff input against
-  -o, --output <OUTPUT>              Output file to write to
-  -c, --config <CONFIG>              Configuration file
-  -p, --pen <PEN>                    Print pen info
-  -l, --object-layer <OBJECT_LAYER>  Layer of object to print info
-  -b, --object <OBJECT>              Print object info
+  -p, --pen <PEN>                    Print info for pens
+  -o, --object <OBJECT>              Print info for objects
+  -b, --object-layer <OBJECT_LAYER>  Object layer to query object on
   -v, --verbose...                   Increase logging verbosity
   -q, --quiet...                     Decrease logging verbosity
   -h, --help                         Print help
 ```
 
+Applies configuration YAML to input .mlp file
+
+``` text
+Usage: minilase.exe --input <INPUT> apply [OPTIONS] --config <CONFIG>
+
+Options:
+  -c, --config <CONFIG>  Configuration file
+  -o, --output <OUTPUT>  Output file to write to
+  -v, --verbose...       Increase logging verbosity
+  -q, --quiet...         Decrease logging verbosity
+  -h, --help             Print help
+```
+
 ## Configuration File
 
 Operations defined in the configuration file are applied in order of definition.

+ 1 - 1
src/ezcad/objects/mod.rs

@@ -388,7 +388,7 @@ impl ObjectModifier {
         let bound_a: Point = Point { x: min_x, y: min_y };
         let bound_b: Point = Point { x: max_x, y: max_y };
 
-        debug!("Skewed bounding box (corrected): {}, {}", bound_a, bound_b);
+        debug!("Bounding box: {}, {}", bound_a, bound_b);
 
         // Calculate origin of bounding box
         let origin: Point = (bound_a + bound_b) / Point::from(2.0);