Open mikelei8291 opened 7 years ago
I like this idea, though sadly I don't have the time to implement it right now (also I've never heard of any of those other than TinEye :-p). Will keep in mind for when I get some free time.
I think it's a good idea to make an API for the search engines, so we can add engines easily, or even let users to add custom engines by themselves.
BTW, SauceNAO, iqdb and ascii2d are mainly used to search 2-d paintings, and WAIT (aka "What Anime Is This) are designed for searching anime screenshots.
I don't know if the APIs are standardized enough to allow end-user configuration (for instance, Google Images requires a lot of weird compatibility workarounds. I would rather not take this approach if it means having to embed a full scripting engine.
Having a internal search API would be pretty trivial though. Adding a new search provider would just mean implementing an interface. I was thinking this:
interface ISearchEngine
{
Task<string> Search(UploadArgs args, CancellationToken cancelToken);
}
I came up with the idea of making an API from another image search application written in Java as an Android application, but actually I haven't thought that Google Image Search needs that many workarounds, sorry for that.
Here is the link of the project I mentioned above: https://github.com/RikkaW/SearchByImage Hope it may be helpful to you.
No worries. In that project, it looks like there's some custom code for every search provider: UploadService
So full extensibility is impossible without writing code (which would in turn require a scripting engine). And if someone is willing to write the code, they might as well just submit a pull request to this repo ;-)
This project seems very useful. I think it will be more useful if you can add more search engine in it. e.g. SauceNAO / iqdb / ascii2d / TinEye / WAIT