A simple Python script that automates text substitution or expansion based on predefined trigger words.
Text Substitution Tool is a Python script that allows you to automatically replace trigger words or phrases with predefined replacements while typing. This can be especially useful for inserting frequently used content, shortcuts, or commonly typed phrases without the need to type them out in full.
- Replace trigger words with predefined replacements.
- Enhance typing efficiency and reduce repetitive tasks.
- Easy customization of trigger-replacement pairs.
- Python 3.x
Clone this repository:
git clone https://github.com/your-username/text-substitution.git
cd text-substitution
-
Install the required library:
pip install keyboard
-
Customize the text_substitutions dictionary in the script with your own trigger-replacement pairs. Run the script using Python in the command line:
python text_substitution.py
-
Start typing in any text input field. Whenever you type a space, the script will check if any trigger words are present and replace them with their corresponding replacements.
You can customize the behavior of the tool by modifying the text_substitutions dictionary in the script. Add your trigger words as keys and their corresponding replacements as values.
text_substitutions = {
"hlw": "Hello",
"crT": "create",
# Add more substitutions as needed
}
Contributions are welcome! If you find any issues or have ideas for improvements, feel free to open an issue or submit a pull request.