Skip to content

Instantly share code, notes, and snippets.

@balfiere
balfiere / thai_images2ocr
Last active July 13, 2025 19:36
A workaround to python_thai_ocr crashing on some of my pdfs. Inside a folder of images, OCR each image and append the output to the argument passed to the script. Example usage: ~/scripts/thai_images2ocr ocr.txt
#!/bin/bash
# first argument is the output file
output=$1
# remove the output file if it already exists
rm -f "$output"
# create the output file
touch "$output"