Column Script idea: Reverse image search...

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
kunkel321
Posts: 664
Joined: 10 Jun 2012 03:45
Location: Near Seattle

Column Script idea: Reverse image search...

Post 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?
ste(phen|ve) kunkel
Scaling: Main monitor 125%, Secondary monitor on the right 100%
OS: Win 10. XYplorer version: Latest beta, unless specified.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

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

Post 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
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

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

Post 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:

kunkel321
Posts: 664
Joined: 10 Jun 2012 03:45
Location: Near Seattle

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

Post 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...
ste(phen|ve) kunkel
Scaling: Main monitor 125%, Secondary monitor on the right 100%
OS: Win 10. XYplorer version: Latest beta, unless specified.

Post Reply