# TRex - Text Recognition for Arch Linux
Lightning-fast OCR tool optimized for Wayland/Hyprland on Arch Linux. Select screen area → Extract text → Copy to clipboard.
## Features
- 🎯 **Simple** - One command to capture and extract text
- ⚡ **Lightning Fast** - Tesseract by default, results in under 0.5s
- 🖥️ **Wayland Native** - Built for modern Linux desktops
- 📋 **Clipboard Integration** - Automatically copies extracted text
- 🎨 **Flexible** - Fast mode by default, --accurate flag for complex text
## Installation
```bash
# Install system dependencies (Arch Linux)
sudo pacman -S grim slurp wl-clipboard tesseract tesseract-data-eng
# Install TRex (lightweight by default)
pip install trex-linux
```
By default, TRex uses Tesseract for blazing-fast OCR. For better accuracy on complex images, install the accurate mode dependencies.
## Usage
```bash
# Default: Select area → OCR → Copy to clipboard
trex
# OCR image from clipboard
trex -c
# OCR image file
trex -f screenshot.png
# Output to stdout instead of clipboard
trex -o stdout
# Use different language (e.g., German)
trex -l deu
# Use accurate mode for complex/handwritten text
trex --accurate
```
## Performance
- **Default mode**: ~0.3-0.5s (Tesseract)
- **Accurate mode**: ~2-3s (EasyOCR, downloads AI models on first use)
## Languages
**Tesseract (default)**: Uses standard 3-letter codes
- `eng` - English (default)
- `deu` - German
- `fra` - French
- `spa` - Spanish
- `jpn` - Japanese
- Install more: `sudo pacman -S tesseract-data-[lang]`
**EasyOCR (--accurate mode)**:
- `en`, `de`, `fr`, `es`, `ja`, `ko`, `ch_sim`, etc.
- Full list: https://github.com/JaidedAI/EasyOCR#supported-languages
## Configuration
Optional config file at `~/.config/trex/config.json`:
```json
{
"language": "en",
"gpu": false
}
```
Set `"gpu": true` if you have NVIDIA GPU with CUDA support.
## Requirements
- Arch Linux
- Wayland compositor (tested on Hyprland)
- Python 3.8+
- CUDA (optional, for GPU acceleration)
## Accurate Mode Setup
For complex images, handwriting, or multiple languages:
```bash
# Install accurate mode dependencies
pip install trex-linux[accurate] --extra-index-url https://download.pytorch.org/whl/cpu
# Or with GPU support (NVIDIA CUDA)
pip install trex-linux[accurate,gpu]
```
Then use `trex --accurate` for better accuracy at the cost of speed.
## License
MIT
Raw data
{
"_id": null,
"home_page": null,
"name": "trex-linux",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "ocr, tesseract, easyocr, wayland, linux, screenshot, text-recognition, fast-ocr, clipboard",
"author": null,
"author_email": "amebalabs <team@amebalabs.com>",
"download_url": "https://files.pythonhosted.org/packages/9f/ea/e3617150864b2fb59a7b1815b9450f90d4962f35ff3115768d2324790854/trex_linux-1.0.1.tar.gz",
"platform": null,
"description": "# TRex - Text Recognition for Arch Linux\n\nLightning-fast OCR tool optimized for Wayland/Hyprland on Arch Linux. Select screen area \u2192 Extract text \u2192 Copy to clipboard.\n\n## Features\n\n- \ud83c\udfaf **Simple** - One command to capture and extract text\n- \u26a1 **Lightning Fast** - Tesseract by default, results in under 0.5s\n- \ud83d\udda5\ufe0f **Wayland Native** - Built for modern Linux desktops\n- \ud83d\udccb **Clipboard Integration** - Automatically copies extracted text\n- \ud83c\udfa8 **Flexible** - Fast mode by default, --accurate flag for complex text\n\n## Installation\n\n```bash\n# Install system dependencies (Arch Linux)\nsudo pacman -S grim slurp wl-clipboard tesseract tesseract-data-eng\n\n# Install TRex (lightweight by default)\npip install trex-linux\n```\n\nBy default, TRex uses Tesseract for blazing-fast OCR. For better accuracy on complex images, install the accurate mode dependencies.\n\n## Usage\n\n```bash\n# Default: Select area \u2192 OCR \u2192 Copy to clipboard\ntrex\n\n# OCR image from clipboard\ntrex -c\n\n# OCR image file\ntrex -f screenshot.png\n\n# Output to stdout instead of clipboard\ntrex -o stdout\n\n# Use different language (e.g., German)\ntrex -l deu\n\n# Use accurate mode for complex/handwritten text\ntrex --accurate\n```\n\n## Performance\n\n- **Default mode**: ~0.3-0.5s (Tesseract)\n- **Accurate mode**: ~2-3s (EasyOCR, downloads AI models on first use)\n\n## Languages\n\n**Tesseract (default)**: Uses standard 3-letter codes\n- `eng` - English (default)\n- `deu` - German\n- `fra` - French\n- `spa` - Spanish\n- `jpn` - Japanese\n- Install more: `sudo pacman -S tesseract-data-[lang]`\n\n**EasyOCR (--accurate mode)**: \n- `en`, `de`, `fr`, `es`, `ja`, `ko`, `ch_sim`, etc.\n- Full list: https://github.com/JaidedAI/EasyOCR#supported-languages\n\n## Configuration\n\nOptional config file at `~/.config/trex/config.json`:\n\n```json\n{\n \"language\": \"en\",\n \"gpu\": false\n}\n```\n\nSet `\"gpu\": true` if you have NVIDIA GPU with CUDA support.\n\n## Requirements\n\n- Arch Linux\n- Wayland compositor (tested on Hyprland)\n- Python 3.8+\n- CUDA (optional, for GPU acceleration)\n\n## Accurate Mode Setup\n\nFor complex images, handwriting, or multiple languages:\n\n```bash\n# Install accurate mode dependencies \npip install trex-linux[accurate] --extra-index-url https://download.pytorch.org/whl/cpu\n\n# Or with GPU support (NVIDIA CUDA)\npip install trex-linux[accurate,gpu]\n```\n\nThen use `trex --accurate` for better accuracy at the cost of speed.\n\n## License\n\nMIT\n",
"bugtrack_url": null,
"license": null,
"summary": "Lightning-fast OCR tool for Wayland/Linux. Tesseract by default, with optional AI-powered mode.",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/amebalabs/trex-linux",
"Issues": "https://github.com/amebalabs/trex-linux/issues",
"Repository": "https://github.com/amebalabs/trex-linux"
},
"split_keywords": [
"ocr",
" tesseract",
" easyocr",
" wayland",
" linux",
" screenshot",
" text-recognition",
" fast-ocr",
" clipboard"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "28c454d05fa70aaa124c1fa4fb2e610581d34ab8edfa9f248097bc107af09e58",
"md5": "f3a948515466b4f7564b49f3fbcf8322",
"sha256": "b6240c66d38b588c11eb417dd6cc0a558f0f13fd22e80e84f5d51a49cf9058f9"
},
"downloads": -1,
"filename": "trex_linux-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f3a948515466b4f7564b49f3fbcf8322",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 14002,
"upload_time": "2025-07-12T18:28:04",
"upload_time_iso_8601": "2025-07-12T18:28:04.921710Z",
"url": "https://files.pythonhosted.org/packages/28/c4/54d05fa70aaa124c1fa4fb2e610581d34ab8edfa9f248097bc107af09e58/trex_linux-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9feae3617150864b2fb59a7b1815b9450f90d4962f35ff3115768d2324790854",
"md5": "f587023360946198289791758c25c9ef",
"sha256": "cd7361e9eceaf2bd96107ed45fe09e8f7e70fd9f3e040e60c33ef00349bf5af9"
},
"downloads": -1,
"filename": "trex_linux-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "f587023360946198289791758c25c9ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 13609,
"upload_time": "2025-07-12T18:28:05",
"upload_time_iso_8601": "2025-07-12T18:28:05.706088Z",
"url": "https://files.pythonhosted.org/packages/9f/ea/e3617150864b2fb59a7b1815b9450f90d4962f35ff3115768d2324790854/trex_linux-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-12 18:28:05",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "amebalabs",
"github_project": "trex-linux",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "trex-linux"
}