Python tool to set prices based on percentage markup
- Clone the repo
git clone https://github.com/snalye/supermarketsim_pricer
- Navigate to the project directory
cd supermarketsim_pricer - Install the required dependencies using pip
pip install pyautogui pillow pytesseract pyperclip keyboard opencv-python
- Download tesseract-ocr from their github: https://github.com/UB-Mannheim/tesseract/wiki
According to this guide, set the percentage to 0-10% to avoid complaints
-
Update the config.ini file with the desired configuration parameters:
tesseract_cmd: Path to the Tesseract OCR executable.x1, y1, x2, y2: Coordinates of the top-left and bottom-right corners of the region of interest (ROI) on the screen. It is currently setup for a 1440p screen- Keybinds
scan: Key combination to trigger the price checking action via screenshot. Defaultctrl+shift+amanual: Key comination to trigger the manual price checking. Defaultctrl+shift+spercentage: Key comination to trigger the manual price checking. Defaultctrl+shift+xexit: Key combination to exit script. Defaulttab
-
Run the script:
python main.py
-
Once the script is running, use the specified keybind (default is ctrl+shift+a) to trigger the price checking action. If no text is detected in the specified region, you'll be prompted to enter the price value manually.
-
The script will calculate the updated price with the specified percentage increase and copy it to your clipboard.
Contributions are welcome! This is my first python script so there may be better ways this can be accomplished. If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.