Last active
December 20, 2017 10:25
-
-
Save Ad5001/36f178ecd4b27de7a209deef92c0e0b2 to your computer and use it in GitHub Desktop.
Script to transcript an image to an ODT file for linux & macos. Dependencies: tesseract-ocr, docutils (https://sourceforge.net/projects/docutils/?source=typ_redirect)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
convert $1 /tmp/out.tif | |
tesseract -l ${1:fra} /tmp/out.tif /tmp/out > /tmp/img2odt.log || echo "Error! Image conversion failed. Check /tmp/img2odt for more infos" | |
rst2odt.py /tmp/out.txt "$(pwd)/out.odt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment