Batch text replacement powered by dictionaries. Replace keys with values or values with keys across entire directories.
git clone https://github.com/cainky/ReplaceText.git && cd ReplaceText && poetry install
Replace keys with values or values with keys. Perfect for encoding/decoding or reversible transformations.
Define multiple replacement dictionaries in one config file and switch between them easily.
Skip files by extension, prefix, or entire directories. Never accidentally modify binaries or dependencies.
Process entire directories at once. Recursively replace text across all matching files.
Simple JSON config file for dictionaries and ignore patterns. Easy to version control.
If only one dictionary exists, it's automatically selected. No extra prompts needed.
{
"dictionaries": {
"obfuscate": {
"password": "p4ssw0rd",
"admin": "4dm1n",
"secret": "s3cr3t"
}
},
"ignore_extensions": [".exe", ".dll", ".bin"],
"ignore_directories": ["node_modules", "venv", ".git"],
"ignore_file_prefixes": [".", "_"]
}
# Run the replacement tool
$ poetry run python replace_text/replace_text.py
# Select direction:
Enter '1' for keys-to-values
Enter '2' for values-to-keys
# Enter folder path and dictionary name
# All matching files will be processed!