microsoft / microsoft/PowerToys
[Text Extractor] Add a headless OCR CLI
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 139k
- Forks
- 8.6k
- PR merge metrics
- PR metrics pending
Description
Description of the new feature / enhancement
Add a supported, headless command-line interface for Text Extractor OCR.
The CLI should support OCR from an image file and, where feasible, a specified screen region. Recognized text should be written to stdout by default, with options for clipboard, text-file, and machine-readable output.
Example shape:
powertoys text-extractor image screenshot.png
powertoys text-extractor region --x 100 --y 100 --width 800 --height 600 --language en-US
Scenario when this would be used?
- Extract text from screenshots in scripts, document-processing workflows, and accessibility tools.
- Let another application or agent invoke Windows OCR without opening an interactive selection overlay.
- Batch-process image files and redirect recognized text into other terminal commands.
Supporting information
This should expose Text Extractor's OCR capability, not only launch its current interactive UI. It should provide predictable stdout/stderr behavior, documented exit codes, language selection, and follow doc/devdocs/cli-conventions.md.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read doc/devdocs/cli-conventions.md first, then inspect the existing Text Extractor OCR entry point and how its interactive UI is launched. Define the CLI scope around image files and feasible screen regions, with stdout, clipboard, text-file, machine-readable output, language selection, documented exit codes, and predictable stdout/stderr behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli, computer-vision, desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100