Convert scanned text into multi-page, OCR friendly files.
621
This is a docker container whose sole purpose it to unpack an archive containing TIFF images, prep them for OCR using textcleaner, and combine them into a single PDF file.
Used in combination with coaxial/insaned-config, because a SBC isn't beefy enough to handle imagemagick on more than a couple of pages.
The container has two directories, dropbox, and processed. When a tar.gz
file is written to dropbox, the container will unpack it, optimze each page
for OCR with textcleaner, and combine them to a single PDF file.
+-----------+ +-----------------+ +-------------+
| | | | | |
| Scanner +-----> combine-tif2pdf +-------> Mayan EDMS/ |
| | | | | OCR |
+-----------+ +-----------------+ +-------------+
+-----------+ +------------------------------+ +-------------+
| ./dropbox +---> unpack => textcleaner => pdf +--> ./processed |
+-----------+ +------------------------------+ +-------------+
dropbox directoryIs exported by the docker container at /ct2p/incoming, and should be mapped
to a network share where scanned documents can be written to. The requirements
for scanned documents are:
tar.gz file.tif filesThe pages will be assembled in alphabetical order, from their names.
insaned-config names the pages with a timestamp, so they will be assembled in
the order they're scanned.
processed directoryIs exported by the docker container at /ct2p/processed. Files placed there
are PDF files, and can be readily ingested by Mayan EDMS. It can be automated
by instructing Mayan EDMS to watch for changes in this directory and import any
file written there.
tar.gz by checking their extension and magic
number. Files that don't match are deleted.tif. Ideally, the script should find out what
image files are in the archive and use this list for processing.Uses GNU parallel by O. Tange, and textcleaner by Fred Weinhaus. For commercial/for-profit use, please refer to the textcleaner LICENSE file for more information.
Content type
Image
Digest
Size
102.4 MB
Last updated
about 9 years ago
docker pull coaxial/ct2p