Has anyone built a macro that automatically uploads an image to Google for a reverse image search?
The user interface of Google image search requires the user to drag & drop an image into the search bar, or click a button and then select a file from the local disks. Both things seem cumbersome to emulate with KBM.
What Google also allows is to search by image URL, which would look like this:
This, however, requires that the image to be searched first be uploaded to some webserver. In the above example, I used my Dropbox account. This slows things down, and introduces another potential point of failure.
The macro I’d like to build would…
let me select a portion of my screen to “screenshoot”
save that as a temporary local file
emulate whatever my browser would do behind the scenes after I drag & drop this file onto Google’s image search bar (but without having to resort to actual mouse actions)
Apparently the “secret sauce” of this workflow is this python script. It reads a local file and then uploads it to Google Image Search.
I’m not familiar with Python. But I imagine one could run this script using KBM’s “Shell Script” action, provided that Python is installed on the system.
I added the executable Python file (Reverse_Image_Search.py) to my post above.
You can open the script in BBEdit or TextEdit to see what’s in it, of course if you’re unfamiliar with Python it may look like so much Greek.
I did try to make a single integrated macro, but I couldn’t figure out how to feed the Python script the file-path argument it needs when calling it from a text variable…
You might want to try this solution that does not require other application like python , or Alfred to work, and that satisfy the conditions that you have.