Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yonixw authored Jan 9, 2020
1 parent b42ed03 commit 70cdd55
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
Simple 135 line script to replace strings (variables) among many files with a YAML config. Perfect for any CI\CD like in a Dockerfile or a pre-build etc.

# How to use:
`[env1="Environment Value"] python3 mass_string_replacer.py "path\to\yaml" [--wet] [--silent]`
`[env1="Environment Value"] python3 mass_string_replacer.py "path\to\yaml" [--wet] [--silent] [--backup]`

1. Install yaml from [PyYAML](http://pyyaml.org/wiki/PyYAMLDocumentation) for python with `pip[3] install PyYaml`
2. Flags:
* `--wet` Replace data in files. Otherwise just print result to stdout (dry-run)
* `--silent` Don't print any processing info to stdout
* `--backup` Keep backup of original file so you can replace again (good if used inside a docker)
3. Order of execution in each file, for advanced usage:
* `text` replace
* `regex` replace
Expand Down Expand Up @@ -97,4 +98,4 @@ Given environment variable `env1="Im env1!!"` The dry-run result will look like:
[*] Result:
Just replace I am var 1
Remember secret? "OgHNpXjtL)76vXPU7pIX"
```
```

0 comments on commit 70cdd55

Please sign in to comment.