# img2text-cli
A powerful command-line tool to extract text from images using OCR (Optical Character Recognition).
## Features
- 🖼️ **Image to Text**: Convert image files to text using Tesseract OCR
- 📋 **Clipboard Support**: Extract text directly from clipboard images
- 🔄 **Piping Support**: Process images from stdin for automation
- ⚡ **Fast & Efficient**: Built with Python and optimized for performance
- 🎯 **Simple CLI**: Easy-to-use command-line interface
## Installation
### From PyPI (Recommended)
```bash
pip install img2text-cli
```
## Prerequisites
This tool requires **Tesseract OCR** to be installed on your system. For detailed installation instructions, visit the [official Tesseract installation guide](https://tesseract-ocr.github.io/tessdoc/Installation.html).
## Usage
### Basic Usage
Extract text from an image file:
```bash
img2text image.png
```
### Piping Images
Process images from stdin:
```bash
cat image.png | img2text
```
### Clipboard Image
Extract text from an image in your clipboard:
```bash
img2text --clip
```
### Help
Get help and see all options:
```bash
img2text --help
```
## Examples
```bash
# Extract text from a local image file
$ img2text document.png
This is the extracted text from the image...
# Process clipboard image
$ img2text --clip
# Text is automatically copied to clipboard
# Use with other tools
$ ls *.png | xargs -I {} img2text {}
```
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## License
This project is licensed under the GNU General Public License v3 (GPLv3) - see the [LICENSE](LICENSE) file for details.
## Acknowledgments
- [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) - The OCR engine
- [Click](https://click.palletsprojects.com/) - Command line interface creation kit
- [Pillow](https://python-pillow.org/) - Python Imaging Library
- [pyperclip](https://github.com/asweigart/pyperclip) - Cross-platform clipboard operations for text
- [pyperclipimg](https://github.com/asweigart/pyperclipimg) - Cross-platform clipboard operations for images
Raw data
{
"_id": null,
"home_page": null,
"name": "img2text-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "cli, image, ocr, tesseract, text-extraction",
"author": null,
"author_email": "Aman Shaw <amanshaw4511@protonmail.com>",
"download_url": "https://files.pythonhosted.org/packages/12/d1/1b9a33c20151f8a9de4d13980ba21469531e0adf72801faf2545a2b086b6/img2text_cli-0.1.7.tar.gz",
"platform": null,
"description": "# img2text-cli\n\nA powerful command-line tool to extract text from images using OCR (Optical Character Recognition).\n\n## Features\n\n- \ud83d\uddbc\ufe0f **Image to Text**: Convert image files to text using Tesseract OCR\n- \ud83d\udccb **Clipboard Support**: Extract text directly from clipboard images\n- \ud83d\udd04 **Piping Support**: Process images from stdin for automation\n- \u26a1 **Fast & Efficient**: Built with Python and optimized for performance\n- \ud83c\udfaf **Simple CLI**: Easy-to-use command-line interface\n\n## Installation\n\n### From PyPI (Recommended)\n\n```bash\npip install img2text-cli\n```\n\n## Prerequisites\n\nThis tool requires **Tesseract OCR** to be installed on your system. For detailed installation instructions, visit the [official Tesseract installation guide](https://tesseract-ocr.github.io/tessdoc/Installation.html).\n\n## Usage\n\n### Basic Usage\n\nExtract text from an image file:\n```bash\nimg2text image.png\n```\n\n### Piping Images\n\nProcess images from stdin:\n```bash\ncat image.png | img2text\n```\n\n### Clipboard Image\n\nExtract text from an image in your clipboard:\n```bash\nimg2text --clip\n```\n\n### Help\n\nGet help and see all options:\n```bash\nimg2text --help\n```\n\n## Examples\n\n```bash\n# Extract text from a local image file\n$ img2text document.png\nThis is the extracted text from the image...\n\n# Process clipboard image\n$ img2text --clip\n# Text is automatically copied to clipboard\n\n# Use with other tools\n$ ls *.png | xargs -I {} img2text {}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the GNU General Public License v3 (GPLv3) - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- [Tesseract OCR](https://github.com/tesseract-ocr/tesseract) - The OCR engine\n- [Click](https://click.palletsprojects.com/) - Command line interface creation kit\n- [Pillow](https://python-pillow.org/) - Python Imaging Library\n- [pyperclip](https://github.com/asweigart/pyperclip) - Cross-platform clipboard operations for text\n- [pyperclipimg](https://github.com/asweigart/pyperclipimg) - Cross-platform clipboard operations for images",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": "A CLI tool to extract text from images using OCR",
"version": "0.1.7",
"project_urls": {
"Documentation": "https://github.com/amanshaw4511/img2text-cli#readme",
"Homepage": "https://github.com/amanshaw4511/img2text-cli",
"Issues": "https://github.com/amanshaw4511/img2text-cli/issues",
"Repository": "https://github.com/amanshaw4511/img2text-cli"
},
"split_keywords": [
"cli",
" image",
" ocr",
" tesseract",
" text-extraction"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "977236829a1543721a0f2a508215b39088b8c1a42ec9f80fc9831a0ead768d6b",
"md5": "27858a7d5201d6e0a85536672b555b59",
"sha256": "b939955bf0c084dff7759cdad7fed3a5b5c6c67ff6b5b369790f88f12a7adbd5"
},
"downloads": -1,
"filename": "img2text_cli-0.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "27858a7d5201d6e0a85536672b555b59",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3279,
"upload_time": "2025-08-31T11:21:19",
"upload_time_iso_8601": "2025-08-31T11:21:19.592324Z",
"url": "https://files.pythonhosted.org/packages/97/72/36829a1543721a0f2a508215b39088b8c1a42ec9f80fc9831a0ead768d6b/img2text_cli-0.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "12d11b9a33c20151f8a9de4d13980ba21469531e0adf72801faf2545a2b086b6",
"md5": "941c8e53abc8560d141e72f0a587414c",
"sha256": "ca5ff5ea1c2c7c07a8a758151c1d2a62f498c0bfb69acafd683ae1f4247e9e15"
},
"downloads": -1,
"filename": "img2text_cli-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "941c8e53abc8560d141e72f0a587414c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 51207,
"upload_time": "2025-08-31T11:21:20",
"upload_time_iso_8601": "2025-08-31T11:21:20.670174Z",
"url": "https://files.pythonhosted.org/packages/12/d1/1b9a33c20151f8a9de4d13980ba21469531e0adf72801faf2545a2b086b6/img2text_cli-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-31 11:21:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "amanshaw4511",
"github_project": "img2text-cli#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "img2text-cli"
}