ocr-webui

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 25 Imported by: 0

README

OCR WebUI

OCR WebUI allows users to upload images, crop specific sections, and extract text using Optical Character Recognition (OCR). The project is built in Go, leveraging gosseract for OCR and HTMX for seamless interactions while being lightweight.

Installation

Docker

  1. Run docker run -p 3000:3000 ghcr.io/purylte/ocr-webui:latest
  2. Open http://localhost:3000/app

Local

  1. Ensure Tesseract and Leptonica is installed
  2. Add required languages by placing traineddata file in your tesseract installation.
  3. Run ./ocr-webui
  4. Open http://localhost:3000/app

Development

Using Dev Container (VS Code)

  1. Ensure Docker and Dev Containers extension is installed
  2. Open this project in VS Code
git clone https://github.com/purylte/ocr-webui.git
code ocr-webui
  1. Run "Dev Containers: Reopen in Container" in VS Code
  2. Run air to start hot reload

Manually

  1. Clone the repository
git clone https://github.com/purylte/ocr-webui.git
cd ocr-webui
  1. Install Tesseract and Leptonica

  2. Install the required Go tools:

go install github.com/a-h/templ/cmd/templ@latest
go install github.com/air-verse/air@latest```
  1. Run air to start hot reload

Todo

  1. Preprocess image before doing OCR using gocv
  2. Test
  3. Better logging & error handling

Contributing

Feel free to fork this project, submit issues, and create pull requests. Contributions are welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
templ: version: v0.2.778
templ: version: v0.2.778

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL