# EzCAD Patcher
This tool parses and patches EZCAD files with values specified in a YAML config file.
## Usage
``` text
Usage: ezcad_patcher.exe [OPTIONS] --input
Options:
-i, --input Input file to parse
-o, --output Output file to write to
-c, --config Configuration file
-v, --verbose... Increase logging verbosity
-q, --quiet... Decrease logging verbosity
-h, --help Print help
```
## Patching Pen Settings
Three operations are supported for patching pen settings:
1. Setting values of specific fields for a given pen:
``` yaml
Pens:
- !Patch
Pen: 0 # Required - pen index
Color: [127, 127, 127] # Optional - pen RGB color
Enabled: true # Optional - pen enable flag
LoopCount: 3 # Optional - pen loop count
Speed: 1.234 # Optional - pen speed
Power: 10.5 # Optional - pen power
Frequency: 10000 # Optional - pen frequency
```
2. Cloning one pen to another:
``` yaml
Pens:
- !Clone
From: 0
To: 1
# Color: [127, 127, 127] # Optional - cloned pen RGB color
# Enabled: true # Optional - cloned pen enable flag
# LoopCount: 3 # Optional - cloned pen loop count
# Speed: 1.234 # Optional - cloned pen speed
# Power: 10.5 # Optional - cloned pen power
# Frequency: 10000 # Optional - cloned pen frequency
```
3. Incrementing a specific field across a sequence of pens:
``` yaml
Pens:
- !Pattern
From: 1
To: 5
# Field: !Loops 1 # Choose one
# Field: !Speed 100.0 # Choose one
# Field: !Power 10.0 # Choose one
# Field: !Frequency 1000 # Choose one
```
Patching operations will be applied in the order that they are defined.