# mapsd
Because sometimes `sed` needs an explicit key/value map.
[Get Started](#quickstart) - [Installation](#installation) - [Usage](#usage)
---
Find & Replace text in multiple files using an explicit CSV of Before/After pairs.
---
# Quickstart
#### 1. Download [latest release](https://github.com/Jonarod/mapsd/releases) for your system
Or you can also build it from source using `cargo` (see [Installation](#installation)). Then move the binary somewhere like in `/usr/local/bin` *(just make sure it is some folder already in your `$PATH`)*
#### 2. Create a `.csv` file with 2 columns:
```csv
old_string1,new_string1
old_string2,new_string2
old_string3,new_string3
```
> ***WARNING: beware of the `spaces` and `separator` you put here !! Every character counts, even spaces***
#### 3. Replace all occurrences of the 1st column with the 2nd, over all `.html` files in the `./Documents` directory
```sh
mapsd "./Documents/**/*.html" -m ./my_map.csv
```
*(No worries, by default it applies the replacement in a copy of the files. When you feel you are ready you can add the `--DANGEROUSLY-REPLACE-INPLACE` flag to actually replace things in place.)*
# Usage
```sh
mapsd 0.0.1
Find & Replace text in multiple files using an explicit CSV of Before/After pairs.
USAGE:
mapsd [FLAGS] [OPTIONS]
FLAGS:
--has-headers CSV has headers
-h, --help Prints help information
--DANGEROUSLY-REPLACE-INPLACE Replace files in-place (USE WITH CAUTION)
--silent Suppress output
-V, --version Prints version information
OPTIONS:
-d, --delimiter CSV delimiter [default: ,]
-m, --map