bpanthi977 / org-mpv-notes

Take notes in org mode while watching videos in mpv media player
MIT License
17 stars 6 forks source link

org-mpv-notes-screenshot-ocr is not taking arguments correctly #26

Open cnoceda opened 3 days ago

cnoceda commented 3 days ago

Hi, I'm testing this package and I found something that is not qorking fine. It seems that org-mpv-notes-ocr-command-args as string does not like to call-process. If you change the default value "-" and add any other parameter stops working well. The cause may be that the args argument in call-process doesn't like a string. It prefer individual string elements like: (call-process org-mpv-notes-ocr-command nil t nil (file-truename file) "-" "-l" "eng+spa" "quiet") if you call like: (call-process org-mpv-notes-ocr-command nil t nil (file-truename file) "- -l eng+spa quiet") does not take any of the parameters, and use all the string as the output parameter of tesseract-ocr and creates a file like this: - -l eng+spa quiet.txt

I'll try to post the solution here, this afternoon.

Regards.

cnoceda commented 3 days ago

Was easier that I think. (apply 'call-process (append (list org-mpv-notes-ocr-command nil t nil (file-truename file)) (split-string-shell-command org-mpv-notes-ocr-command-args) ))

Now it works fine. I'll try to make a pull request this afternoon...