-
-
Save ghickman/decca82fb0e67d7e6e65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
PENDING = '/Users/george/Scans/Pending OCR' | |
RM_CMD = r"""osascript -e 'tell app "Finder" to move the POSIX file "{}" to trash'""" | |
pdf = os.path.basename(sys.argv[1]) | |
root, ext = os.path.splitext(pdf) | |
path = os.path.join(PENDING, image + '.jpg') | |
if os.path.exists(path): | |
os.system(RM_CMD.format(path)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment