I would use the OCR tool tesseract in python as it supports sanskrit language. It is the best OCR tool so far for reading text chunks in the images given. Otherwise there's also a way to use machine learning to detect the sanskrit words and thus the texts in process, but that process could be prone to errors and may take longer time with less benefit at last. I can build an executable file upon writing the python script which could be run smoothly in linux shell. It would take around 5-7 days to complete.
Thank you,
Regards,
Sayan Chaudhuri.