From 88ea9111809c6b3729a7a3b341c27167a3f4ab5d Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 10 Aug 2025 07:45:25 +0000 Subject: [PATCH 1/3] I have updated the `README.md` file to include: - A "Prerequisites" section mentioning the need for a Python installation. - Platform-specific instructions for installation and usage, clarifying that the `.bat` files are for Windows only and providing alternative commands for macOS/Linux users. --- README.md | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..b4f846e --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +# OopsWrongLang + +A simple utility to fix text that you accidentally typed in the wrong keyboard layout (English to Persian and vice-versa). + +## Features + +- Converts selected text between English and Persian keyboard layouts. +- Runs in the background with a system tray icon. +- Easy to use with a simple keyboard shortcut. +- Cross-platform (should work on Windows, macOS, and Linux). + +## How it Works + +The application runs in the background and monitors for a specific keyboard shortcut. When you press the shortcut, it does the following: + +1. Copies the currently selected text to the clipboard. +2. Converts the text to the other keyboard layout (e.g., English to Persian). +3. Pastes the converted text, replacing your selection. + +## Prerequisites + +- You must have Python installed on your system. You can download it from [python.org](https://www.python.org/). + +## Installation + +1. Clone this repository or download the source code. +2. **For Windows users:** + Run the `install.bat` script to create a virtual environment and install the required dependencies. + ```batch + install.bat + ``` + **For macOS/Linux users:** + Open your terminal and run the following commands: + ```bash + # Create a virtual environment + python -m venv venv + + # Activate the virtual environment + # On macOS/Linux: + source venv/bin/activate + # On Windows (if not using the .bat file): + # venv\\Scripts\\activate + + # Install the dependencies + pip install -r requirements.txt + ``` + +## Usage + +**For Windows users:** + +1. Run the `run.bat` script to start the application. + ```batch + run.bat + ``` + +**For macOS/Linux users:** + +1. Make sure you have activated the virtual environment (see Installation section). +2. Run the main script: + ```bash + python src/main.pyw + ``` +2. The application will start running in the background, and you will see its icon in the system tray. +3. Select any text you want to convert. +4. Press `Ctrl+Space`. +5. The selected text will be instantly converted. + +To quit the application, right-click the tray icon and select "Quit". + +## Dependencies + +This project uses the following Python libraries: + +- `keyboard` +- `pyperclip` +- `pystray` +- `Pillow` + +These dependencies are listed in `requirements.txt` and will be installed automatically when you run `install.bat`. From 75a3c5aa0c647b7f71b557487321cb4076ab3486 Mon Sep 17 00:00:00 2001 From: Hamed <36635653+Hamedrz004@users.noreply.github.com> Date: Sun, 10 Aug 2025 11:35:38 +0330 Subject: [PATCH 2/3] Update README.md updated readme.md file for clearer instructions --- README.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b4f846e..65f9e3f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A simple utility to fix text that you accidentally typed in the wrong keyboard l - Converts selected text between English and Persian keyboard layouts. - Runs in the background with a system tray icon. - Easy to use with a simple keyboard shortcut. -- Cross-platform (should work on Windows, macOS, and Linux). +- Cross-platform (should work on Windows, macOS, and Linux but only tested on windows). ## How it Works @@ -56,18 +56,36 @@ The application runs in the background and monitors for a specific keyboard shor **For macOS/Linux users:** -1. Make sure you have activated the virtual environment (see Installation section). +1. Activate the virtual environment: + ```bash + source venv/bin/activate + ``` 2. Run the main script: ```bash - python src/main.pyw + pythonw src/main.pyw ``` -2. The application will start running in the background, and you will see its icon in the system tray. -3. Select any text you want to convert. -4. Press `Ctrl+Space`. +3. The application will start running in the background, and you will see its icon in the system tray. +4. Select any text you want to convert. +5. Press `Ctrl+Space`. (or any other shorcut in the shortcut.txt file. see configuration for details.) 5. The selected text will be instantly converted. To quit the application, right-click the tray icon and select "Quit". +## Configuration + +**For Windows users:** +use the `configure&run.bat` for ease of use. +it automatically updates `shortcut.txt` file and runs the app. +you can edit the `shortcut.txt` yourself too but be cautious. + +**For macOS/Linux users:** +after activating the virtual environment, you can run: +```bash +python src/config.py +``` +it automatically updates `shortcut.txt` file and runs the app. +you can edit the `shortcut.txt` yourself too but be cautious. + ## Dependencies This project uses the following Python libraries: From 19dde1377d807eb8c27ad60e53ff375a68593209 Mon Sep 17 00:00:00 2001 From: Hamed <36635653+Hamedrz004@users.noreply.github.com> Date: Sun, 10 Aug 2025 11:38:17 +0330 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 65f9e3f..3ce4104 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ The application runs in the background and monitors for a specific keyboard shor ``` 3. The application will start running in the background, and you will see its icon in the system tray. 4. Select any text you want to convert. -5. Press `Ctrl+Space`. (or any other shorcut in the shortcut.txt file. see configuration for details.) +5. Press `Ctrl+Space`. (or any other shorcut in the shortcut.txt file. see [configuration](https://github.com/Hamedrz004/oopswronglang/tree/add-readme?tab=readme-ov-file#configuration) for details.) 5. The selected text will be instantly converted. To quit the application, right-click the tray icon and select "Quit".