Skip to content

Commit

Permalink
Add graphics/p5-Image-OCR-Tesseract
Browse files Browse the repository at this point in the history
perform ocr on an image and output text to stdout
  • Loading branch information
dlangille committed Dec 18, 2018
1 parent e3f13d0 commit 650f53f
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions graphics/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@
SUBDIR += p5-Image-Math-Constrain
SUBDIR += p5-Image-MetaData-GQview
SUBDIR += p5-Image-MetaData-JPEG
SUBDIR += p5-Image-OCR-Tesseract
SUBDIR += p5-Image-ObjectDetect
SUBDIR += p5-Image-PBMlib
SUBDIR += p5-Image-PNG-Libpng
Expand Down
25 changes: 25 additions & 0 deletions graphics/p5-Image-OCR-Tesseract/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# $FreeBSD$

PORTNAME= Image-OCR-Tesseract
PORTVERSION= 1.24
CATEGORIES= graphics perl5
MASTER_SITES= CPAN
MASTER_SITE_SUBDIR= CPAN:LEOCHARRE
PKGNAMEPREFIX= p5-

MAINTAINER= [email protected]
COMMENT= Read an image with Resseract OCR and get output

LICENSE= GPLv3

MYDEPENDS= tesseract>0:graphics/tesseract \
ImageMagick6-nox11>0:graphics/ImageMagick6-nox11
BUILD_DEPENDS= ${MY_DEPENDS}
RUN_DEPENDS= ${MY_DEPENDS}

USES= perl5
USE_PERL5= configure

NO_ARCH= yes

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions graphics/p5-Image-OCR-Tesseract/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1545145985
SHA256 (Image-OCR-Tesseract-1.24.tar.gz) = cd3428eb2aa9d12154bafbaa89e3d32f41a7b3c6c63884b80857643ca1431262
SIZE (Image-OCR-Tesseract-1.24.tar.gz) = 1468013
17 changes: 17 additions & 0 deletions graphics/p5-Image-OCR-Tesseract/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Provides a perl interface to tesseract.

This is just an interface to make it quick an easy to get ocr output from an
image file. No matter what image type you provide, imagemagick convert is
called to turn it into the format for tesseract

Also accepts any image input- takes care of converting your imput image to a
tiff to the required specs, without changing the original.

Example usage:

ocr ./image.jpg > ./savetext.txt
ocr ./image.png
ocr ./image1.jpg ./image2.jpg > ./alltext.txt
ocr ./image*jpg

WWW: https://metacpan.org/release/LEOCHARRE/Image-OCR-Tesseract-1.24
5 changes: 5 additions & 0 deletions graphics/p5-Image-OCR-Tesseract/pkg-plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bin/ocr
%%SITE_PERL%%/Image/OCR/Tesseract.pm
%%SITE_PERL%%/Image/OCR/Tesseract.pod
%%PERL5_MAN1%%/ocr.1.gz
%%PERL5_MAN3%%/Image::OCR::Tesseract.3.gz

0 comments on commit 650f53f

Please sign in to comment.