!7 p { S options = "--tessdata-dir " + platformQuote(userHome("Downloads")); File tesseract = userHome("local/bin/tesseract"); if (!fileExists(tesseract)) { tesseract = findCmdOnPATH("tesseract"); options = ""; } if (tesseract == null) print("Tesseract not found on PATH"); File png = getProgramFile("screen.png"); print("Making screenshot."); shootScreenAsPNGFile(png); print("Running Tesseract."); time { print(backtick(print(platformQuote(tesseract) + " " + options + " " + platformQuote(png) + " stdout"))); } }