I use the command line program
ocrmypdf to ocr scanned files. In order to use it after all my arguments I must put the input filename/path and the output file name and path. I’d like to create an automator services so that I can use the quick actions to run it from finder. My issue is I’m not clear how I get the input files path into my script. Generally when I do this from the CLI I type
ocrmypdf --optimize 2 --remove-background --deskew --output-type pdf <input file> <output file>
My issue is when doing through automator I’m unsure of how to pass along the file path to the shell script. I currently have it ‘Get Selected Finder Items’ then ‘Run Shell Script’.
ocrmypdf is a python program so I currently have it set the shell as python. Not sure if that is correct either.