Skip to content

Commit 70cdd55

Browse files
authored
Update README.md
1 parent b42ed03 commit 70cdd55

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
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.
44

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

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

0 commit comments

Comments
 (0)