Topic: How to search for tag A, then sort by tag B

Posted under Tag/Wiki Projects and Questions

Wasn't sure whether to put this here, or in Tools and Applications, or in Feature Requests.
Is there a way to search for for one tag (or a group of tags), and then sort by another?
Examples:
I want to know which artist has drawn the most kangaroos. So I would search for species:kangaroo and then sort by artist name.
Same but no nudity: search for kangaroo -naked, sort by artist name
Which species is most frequently drawn with green eyes, search for green_eyes and then sort by species.
Which year artists drew the most motorcycles, search motorcycle and then sort by year.
Which year an artist has been most active: Search for an artist, then sort by year
etc etc etc
Is this already implemented, and I'm just missing it in the docs, or?
TIA

Definitely not something that's implemented. This is something that you could use the API for possibly with some manual coding, or the database export.

alphamule

Privileged

scth said:
Definitely not something that's implemented. This is something that you could use the API for possibly with some manual coding, or the database export.

OK, guess I'll show some examples of how you'd use the DB_Export thing.

fiveout said:
Wasn't sure whether to put this here, or in Tools and Applications, or in Feature Requests.
Is there a way to search for for one tag (or a group of tags), and then sort by another?
Examples:
I want to know which artist has drawn the most kangaroos. So I would search for species:kangaroo and then sort by artist name.
Same but no nudity: search for kangaroo -naked, sort by artist name
Which species is most frequently drawn with green eyes, search for green_eyes and then sort by species.
Which year artists drew the most motorcycles, search motorcycle and then sort by year.
Which year an artist has been most active: Search for an artist, then sort by year
etc etc etc
Is this already implemented, and I'm just missing it in the docs, or?
TIA

Get QSV which works with CSV files. You can also use other programs for this (even Excel or Calc), but 4GB import is not reasonable so you'd want to filter it by those tags first. XD

If you don't know how to use the command prompt, you can just save this line to a file named "Kangaroo_posts.bat" and double-click it in the folder you extracted that 4GB monster to. Change kangaroo or date of export to match if needed (you can just edit it in Notepad).

qsv search --select tag_string --output Kangaroo_posts.csv "kangaroo" posts-2024-12-02.csv

will return a file containing JUST the posts with kangaroo tagged. Yeah, it's less than 20MB and imports almost instantly. :)

Breakdown of that command: "search" makes it limit results to some pattern, "--select tag_string" makes it only compare the tags list in each column, "--output Kangaroo_posts.csv" is what we name the nicely small file that results, kangaroo in quotes is what to match, and finally, the file from yesterday's DB export.

There's more powerful things like searching for multiple expressions like including kangaroo, but then excluding any row with a nude tag. But once you get a file small enough to use a tool you're more familiar with, it's highly optional. It's entirely fine to just replace kangaroo with whatever tag you want. Best not use a tag like 2023 or male, though!

All of those examples you listed are just classic database queries ('searches'). I guess if you really wanted to, you could (or pay someone to) run your own instance of a Booru, and do searches in a web browser interface. ;)

  • 1