eichin / thok-kphotoalbum-grep

Command-line find/grep for kphotoalbum index.xml files
MIT License
2 stars 0 forks source link

Don't flatten all tags - allow search and display _(done)_ by option-type #15

Open eichin opened 1 month ago

eichin commented 1 month ago

--dump-tags prints Keyword foo and Location bar but --dump-tags --since "last week" prints foo and bar. This is inconsistent but I've started building tooling around the latter behavior, and only occasionally grep the full output in a way that is useful to see what types the tags have.

This is a consistency and documentation improvement; it might be worth adding a hierarchical syntax like Keyword/foo or Keyword:foo and using that everywhere instead, combined with some sort of --show-categories / --elide-categories option, but consider just always using the full forms.

eichin commented 1 month ago

Additional discovery, while --dump-tags --since drops the category, --dump-tags --tag does not... in fact, --dump-tags --tag doesn't work unless it also has a --since option.

eichin commented 1 month ago

As of 0.15 it's no longer inconsistent - now it never prints the category. So this ticket should probably be replaced with a feature request for printing (and searching on) categories... once I actually end up needing that; currently, Keyword, Location, and Person are generally distinct enough that collisions don't end up mattering, so defer that until there's an example that matters.

eichin commented 5 days ago

Found a use case: attempting to get icecream-start --tags to actually be mechanically selective - which may be as simple as doing the same search but with output type labels, filter out type location (and the state, explicitly); this leaves "do something clever" to distinguish city names from shop names.

eichin commented 5 days ago

0.17 adds --show-category which changes the --dump-tags output to display the category (ex. Keyword:ice cream instead of just ice cream.) That's only the display half, not the search half; updating title.