Full Mattermost server source with integrated Community Enterprise features. Includes vendor directory for offline/air-gapped builds. Structure: - enterprise-impl/: Enterprise feature implementations - enterprise-community/: Init files that register implementations - enterprise/: Bridge imports (community_imports.go) - vendor/: All dependencies for offline builds Build (online): go build ./cmd/mattermost Build (offline/air-gapped): go build -mod=vendor ./cmd/mattermost 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
68 lines
2.7 KiB
Markdown
68 lines
2.7 KiB
Markdown
# gosseract OCR
|
|
|
|
[](https://github.com/otiai10/gosseract/actions/workflows/go-ci.yml)
|
|
[](https://github.com/otiai10/gosseract/actions/workflows/runtime-docker.yml)
|
|
[](https://github.com/otiai10/gosseract/actions/workflows/runtime-vagrant.yml)
|
|
[](https://codecov.io/gh/otiai10/gosseract)
|
|
[](https://goreportcard.com/report/github.com/otiai10/gosseract)
|
|
[](https://codeclimate.com/github/otiai10/gosseract/maintainability)
|
|
[](https://github.com/otiai10/gosseract/blob/main/LICENSE)
|
|
[](https://pkg.go.dev/github.com/otiai10/gosseract/v2)
|
|
|
|
Golang OCR package, by using Tesseract C++ library.
|
|
|
|
# OCR Server
|
|
|
|
Do you just want OCR server, or see the working example of this package? Yes, there is already-made server application, which is seriously easy to deploy!
|
|
|
|
👉 https://github.com/otiai10/ocrserver
|
|
|
|
# Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/otiai10/gosseract/v2"
|
|
)
|
|
|
|
func main() {
|
|
client := gosseract.NewClient()
|
|
defer client.Close()
|
|
client.SetImage("path/to/image.png")
|
|
text, _ := client.Text()
|
|
fmt.Println(text)
|
|
// Hello, World!
|
|
}
|
|
```
|
|
|
|
# Installation
|
|
|
|
1. [tesseract-ocr](https://github.com/tesseract-ocr/tessdoc), including library and headers
|
|
2. `go get -t github.com/otiai10/gosseract/v2`
|
|
|
|
Please check this [Dockerfile](https://github.com/otiai10/gosseract/blob/main/Dockerfile) to get started step-by-step.
|
|
Or if you want the env instantly, you can just try by `docker run -it --rm otiai10/gosseract`.
|
|
|
|
# Test
|
|
|
|
In case you have [tesseract-ocr](https://github.com/tesseract-ocr/tessdoc) on your local, you can just hit
|
|
|
|
```
|
|
% go test .
|
|
```
|
|
|
|
Otherwise, if you **DON'T** want to install tesseract-ocr on your local, kick `./test/runtime` which is using Docker and Vagrant to test the source code on some runtimes.
|
|
|
|
```
|
|
% ./test/runtime --driver docker
|
|
% ./test/runtime --driver vagrant
|
|
```
|
|
|
|
Check [./test/runtimes](https://github.com/otiai10/gosseract/tree/main/test/runtimes) for more information about runtime tests.
|
|
|
|
# Issues
|
|
|
|
- [https://github.com/otiai10/gosseract/issues](https://github.com/otiai10/gosseract/issues?utf8=%E2%9C%93&q=is%3Aissue)
|