Created
July 5, 2022 08:21
-
-
Save ChlorUpload/ff7966b8ae9d040063e4e8fb33eacee8 to your computer and use it in GitHub Desktop.
replace.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
original = sys.argv[1] | |
dest = sys.argv[2] | |
txt = sys.stdin.read() | |
txt = txt.replace(original, dest) | |
print(txt) | |
""" | |
Usage | |
python replace.py | |
' Object.keys(input || {}).reduce((formData, key) => {' | |
' Object.keys(input || {}).filter((key) => input[key] !== undefined).reduce((formData, key) => {' | |
< src/common/api/types.ts | |
> new_types.ts | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment