Created
February 25, 2021 16:09
-
-
Save cneud/9a05430ec9569f079acb64f62efb80ee to your computer and use it in GitHub Desktop.
Windows batch processing with Tesseract (because I always forget)
This file contains hidden or 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
:Start | |
@Echo off | |
Set _SourcePath=C:\path\to\images\*.tif | |
Set _OutputPath=C:\path\to\output\ | |
Set _Tesseract=C:\path\to\tesseract\tesseract.exe | |
Set _TesseractLang=lang | |
Set _TesseractOutputFormat=alto | |
:Convert | |
For &&A in (%_SourcePath%) Do Echo Processing %%A...&%_Tesseract% -l %_TesseractLang% %%A %_OutputPath%\%%~nA %_TesseractOutputFormat% | |
:End | |
Set "_SourcePath" | |
Set "_OutputPath" | |
Set "_Tesseract" | |
Set "_TesseractLang" | |
Set "_TesseractOutputFormat" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment