Skip to main content

SnapTranslate

SnapTranslate is a simple desktop application that allows you to capture a portion of your screen and instantly translate the text within it. It uses Tesseract OCR for text recognition and the Google Translate API (via the googletrans library) for translation.

Features

  • Screen Capture: Easily select an area of your screen to capture.
  • Instant Translation: Translate the captured text to English.
  • Language Support: Currently supports translation from Russian and Swedish to English. More will added in future developments.
  • Configurable Tesseract Path: Allows you to specify the path to your Tesseract installation via a config.ini file.

Installation

Prerequisites

  • Python 3.6 or higher (3.13 recommended)
  • Tesseract OCR Engine: SnapTranslate relies on Tesseract for text recognition. You need to have Tesseract installed on your system and the language data packs for Russian (rus) and Swedish (swe). You can download Tesseract from https://github.com/tesseract-ocr/tesseract/wiki. Make sure to install the language packs as well.
  • pip (Python package installer)

Installation Steps

  1. Clone the repository:

    git clone [https://github.com/your-github-username/SnapTranslate.git](https://github.com/tousif47/SnapTranslate.git)
    cd SnapTranslate
    
  2. Install the required Python packages:

    pip install .
    

    (This command assumes you are in the root directory of the project where the setup.py file is located. It will install SnapTranslate and all its dependencies.)

Usage

  1. Run the application:

    snaptranslate
    

    This command should launch the SnapTranslate GUI.

  2. Capture Screen Area: Click the "+ New" button. Your screen will become dimmed, and you can click and drag to select the area you want to capture. Release the mouse button to capture.

  3. Translate: After capturing, you will see two buttons: "Translate Russian" and "Translate Swedish". Click the button corresponding to the language of the text in your captured area.

  4. View Translation: The translated text will be displayed in the text area at the bottom of the window.

Configuration

You can configure the path to your Tesseract installation by modifying the config.ini file located in the root directory of the project.

  1. Locate config.ini: This file should be in the same directory as your setup.py file.

  2. Edit config.ini: Open the file in a text editor. You should see a section like this:

    [Tesseract]
    TESSDATA_PATH = /path/to/your/tessdata
    
  3. Update the path: Replace /path/to/your/tessdata with the actual path to the tessdata directory of your Tesseract installation on your system. For example:

    [Tesseract]
    TESSDATA_PATH = C:\Program Files\Tesseract-OCR\tessdata
    

    or

    [Tesseract]
    TESSDATA_PATH = /usr/share/tesseract-ocr/tessdata
    

    Make sure to use the correct path for your operating system.

Supported Languages

Currently, SnapTranslate supports translation from:

  • Russian to English
  • Swedish to English

Contributing

TBA

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

googlepytrans


Thank you for using SnapTranslate!

Metadata

Release files for snaptranslate 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snaptranslate 0.1.0
File Size Uploaded Provenance Actions
snaptranslate-0.1.0.tar.gz 72.9 kB Without provenance Details for snaptranslate-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for snaptranslate 0.1.0
File Interpreter ABI Platform Actions
snaptranslate-0.1.0-py3-none-any.whl Python 3 none any Details for snaptranslate-0.1.0-py3-none-any.whl

Total release size: 76.7 kB

Release files / snaptranslate-0.1.0.tar.gz

Download URL snaptranslate-0.1.0.tar.gz
Size 72.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8a75fcc974fee2b36b6f38cac74dacce349efa0e97b7b0d3159396e8e20575a1
BLAKE2b-256 checksum
How to use checksums
2437dfef4ed094970cdcea56bc862873fdbe00b14db7cd2dd58c42e67186d2f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / snaptranslate-0.1.0-py3-none-any.whl

Download URL snaptranslate-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
027c47525d07623c6e1848bba348f9bebae41ac7066e0e433baae6515cbbfe1d
BLAKE2b-256 checksum
How to use checksums
0f000fb4baf6964d224eaa01970cd3eb78a63fc08b4839839b6e4a7af5aa8a5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for snaptranslate 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page