Page 1 of 1

Column Script idea: Reverse image search...

Posted: 10 Jun 2014 21:16
by kunkel321
Here's a challenge for our local scripting gurus....

The need: My scenario is that I have the Reddit app on my Kindle Fire and whenever I see a cool image, I download it. The problem is that there's really no good way to name the image files as you download them. I then copy the image files to my computer and get something like this:

Image

I'd like them to have descriptive names, rather than names that are random Imgur strings...

The Idea: Google Images lets you do a "Reverse Lookup" where you drag and drop an image file from your computer to the search box. Unfortunately, you apparently can't simply paste the path for the image file and get the same results. It would be cool to have a Custom Column, that would search for the most popular text that is associated with a given image, and then rename the image file to that text. Not all image files will yield a name, but most will. It would be even cooler if the Google search could be restricted to Reddit. That way it would be likely to return the title of the post that the image came from. Alas, I'm not sure if Google Image Search will let you do "background" lookups... I will investigate this more and reply if I found a way.

Thoughts?

Re: Column Script idea: Reverse image search...

Posted: 10 Jun 2014 21:47
by bdeshi
Would be much easier if XY supported http post method (or does it already?)
Meanwhile you'll probably need some 3rd party cmdline network utility.(edit: cURL is great)
I've almost taken the bait, only it's dark night here. :D

Re: Column Script idea: Reverse image search...

Posted: 10 Jun 2014 21:55
by TheQwerty
1) It will be much too slow for anything other than an onClick Column - and with an onClick column you must be careful not to trigger "Refresh Column" since it loads them all.

2) I don't believe it would be entirely legal to automate searching and scraping of results from https://images.google.com/ and from what I can tell they have not made Reverse Image searches possible through their APIs.

3) I'm not having much luck finding a reverse image API that would work. TinEye is another possibility but they don't have a non-commercial API license so you'd be looking at paying $300 a year for only 5,000 searches.


It's a good thought though. :wink:

Re: Column Script idea: Reverse image search...

Posted: 11 Jun 2014 17:51
by kunkel321
Thanks for the replies. Yes, I was also thinking an "on-click" CC would be necessary, though I had not considered the potential legal ramifications. $300 a year!? Those TinEye guys must be nuts...