{"id":43288429,"url":"https://github.com/emcassi/imgrep","last_synced_at":"2026-02-01T18:05:20.245Z","repository":{"id":184847129,"uuid":"672535114","full_name":"emcassi/imgrep","owner":"emcassi","description":"CLI tool that allows searching for text in images","archived":false,"fork":false,"pushed_at":"2024-01-15T15:17:22.000Z","size":42,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T19:53:17.262Z","etag":null,"topics":["command-line-tool","ocr"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emcassi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-30T12:18:41.000Z","updated_at":"2023-12-17T01:07:39.000Z","dependencies_parsed_at":"2024-06-21T19:12:58.724Z","dependency_job_id":null,"html_url":"https://github.com/emcassi/imgrep","commit_stats":null,"previous_names":["emcassi/imgrep"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emcassi/imgrep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcassi%2Fimgrep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcassi%2Fimgrep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcassi%2Fimgrep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcassi%2Fimgrep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emcassi","download_url":"https://codeload.github.com/emcassi/imgrep/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emcassi%2Fimgrep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28984886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T17:52:09.146Z","status":"ssl_error","status_checked_at":"2026-02-01T17:49:53.529Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","ocr"],"created_at":"2026-02-01T18:05:19.511Z","updated_at":"2026-02-01T18:05:20.240Z","avatar_url":"https://github.com/emcassi.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# imgrep\n\n## Introduction\n\nimgrep is a command-line tool that allows users to search for a given pattern in images. It uses optical character recognition (OCR) to extract text from images and performs pattern matching on the extracted text.\n\nThe tool is designed to be flexible and configurable, supporting various options like case-insensitive matching, ignoring punctuation, inverting the match, and providing a context around the matched text.\n\n## Features\n\n- Perform text pattern matching in images.\n- Configurable flags for case-insensitive and punctuation-ignoring matching.\n- Invert match to display lines that do not match the pattern.\n- Display context around the matched text with padding.\n\n## Dependencies\n\n- [Tesseract](https://github.com/tesseract-ocr/tesseract)\n\n## Installation\n\nTo use imgrep, you need to have Go installed on your system.\n\n```bash\ngit clone https://github.com/emcassi/imgrep.git\ncd imgrep\ngo build -o imgrep\n```\n\n## Usage\n\nTo search for a pattern in an image, use the following command:\n\n```bash\n./imgrep [flags] pattern file.png [file2.png ...]\n```\n\n### Flags\n\n- -ic: Ignore case when matching.\n- -ip: Ignore punctuation when matching.\n- -x: Invert match (display lines that do not match the pattern).\n- -p: Padding (characters) for displaying matched text.\n\n### Arguments\n\n- Arg 1 : pattern - accepts regex\n- Arg 2+ : file names\n\nExamples:\n\n```bash\n./imgrep -ic -ip -p 10 hello image1.png\n./imgrep -ic hello imgs/image.png # image in a subfolder\n./imgrep -ic hello image1.png image2.png # input for multiple images\n./imgrep -p 50 '(?i)john' image1.png # supports go style regex statements\n./imgrep -x error image2.png # invert - exclude the pattern in the results\n```\n\n## Roadmap\n\n- [x] Add ocr functionality\n- [x] Add argument parsing\n- [x] Be able to grep a single image\n- [x] Be able to grep multiple images\n- [ ] Be able to pass directories of images\n- [x] Add concurrency support\n- [ ] Further Testing\n- [ ] Add documentation\n\n## Contributing\n\nContributions are welcome! If you want to contribute to imgrep, please follow these steps:\n\n- Read the [Contributing guidelines](CONTRIBUTING.md)\n- Fork the repository and create your branch from main.\n- Make sure your code follows the Go coding style.\n- Run tests to ensure your changes don't break existing functionality.\n- Open a pull request with a clear description of your changes.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Acknowledgements\n\n[gosseract](https://github.com/otiai10/gosseract): A Go library for OCR.\n\n## Contact\n\nFor any questions or suggestions, feel free to get in touch:\n\nGitHub: [emcassi](http://github.com/emcassi)\n\nEmail: \u003calex.wayne.dev@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcassi%2Fimgrep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femcassi%2Fimgrep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femcassi%2Fimgrep/lists"}