Created
March 30, 2022 12:16
-
-
Save Recursing/2fd09e4aa4eeb1b65afa51a94bbcc6b4 to your computer and use it in GitHub Desktop.
This file contains 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
for path in cwd.rglob("*.py"): | |
if 'pipstrap' in str(path): | |
continue | |
if str(path).count('/dev/') > 1: | |
continue | |
text = path.read_text() | |
if 'analytics_view_id' not in text: | |
continue | |
print('replacing in ', path) | |
for k, v in d.items(): | |
text = text.replace(f"analytics_view_id = '{k}", f"analytics_view_id = '{v}") | |
path.write_text(text) | |
print('done', path) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment