https://github.com/danlock/searmage
Search images locally via a CLI, powered by Tesseract
https://github.com/danlock/searmage
Last synced: about 1 year ago
JSON representation
Search images locally via a CLI, powered by Tesseract
- Host: GitHub
- URL: https://github.com/danlock/searmage
- Owner: Danlock
- License: gpl-3.0
- Created: 2023-12-14T21:26:40.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-21T20:39:42.000Z (over 2 years ago)
- Last Synced: 2023-12-21T21:35:53.347Z (over 2 years ago)
- Language: Go
- Size: 29.4 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# searmage
Searmage is a CLI tool for searching through your local images. It can watch a folder and build up an index for quickly searching through images later. Powered by Tesseract and SQLite.
# example
Check out this repo and run ` make build `
` ./bin/searmage -dir /some/folder/with/images -db /tmp/searmage.sqlite3 `
This will parse images in the given directory for any text, and then store the text within the sqlite database.
` ./bin/searmage -search '%the meaning of life%' -db /tmp/searmage.sqlite3 `
This will search the previously parsed image text and return with the path of matching images.
` ./bin/searmage -help `
Will expose further flags, outlined at cfg/args.go
# C
With CGO_ENABLED=0 Wazero is used to run Tesseract and SQLite, which have both been compiled to WASM.
With CGO_ENABLED=1 however you can use a locally installed Tesseract instead. Here's an example on how to install Tesseract locally.
```
sudo apt-get install -y -qq libtesseract-dev libleptonica-dev tesseract-ocr-eng
```
The CGO_ENABLED=0 version is currently roughly 6 times slower.