Danbooru

Image search

Posted under General

To celebrate my 100th upload, I threw together a little greasemonkey script that adds a "IQDB" button to the Danbooru upload page. Clicking it causes the image in question to be checked against IQDB in a new window or tab.

The IQDB side of things seems to work, but I haven't been able to test the Danbooru part because my upload limit has been reached. Once I fully test it, I will post it somewhere, unless the Danbooru or IQDB admins tell me they mind.

I use the "similar"-type search a ton--to check for duplicates before I upload, and to find pictures to begin with so I can get the source. Such an important tool deserves to join the ranks of "My Account", "Posts", and what not at the top, without having to go through a picture you don't care about first.

Below is a quick little script that I've been using all this time, to get me the three additional links I need. (For some reason it breaks the translation tags, so I had to make an exception for that case.)

http://userscripts.org/scripts/review/27776

I'd suggest adapting the code from my greasemonkey script. It works by rewriting the names of the form fields to those expected by IQDB, submitting the form in an iframe, and then rewriting them back when submitting to danbooru.

Since both sites take file and url uploads, files on your own computer should just work.

The current version of the GM script works by loading the IQDB data on the current page. I find that to be quite useful, as it means not having to switch back and forth between tabs while uploading an image.

I've released a new version at http://iqdb.yi.org/code/

The main changes are a greatly reduced memory use (from 140 MB to 87 MB for the iqdb.yi.org databases, at the cost of slightly higher query times; disable this if speed is paramount), and the ability to filter query results.

You can use the latter by prefixing "safe." or "ero." to any iqdb URL, e.g. "safe.danbooru.iqdb.yi.org"; using the search there will only return images rated "safe". The "ero" version will return only safe or questionable images. The default URL will continue to find all images regardless of the rating. If anyone is interested, I can add some kind of interface to allow more fine-grained control over what ratings to allow.

1 2 3 4 5 6