dronefly-garden / dronefly

Red Discord Bot V3 cogs for naturalists.
Other
16 stars 3 forks source link

taxon: support browse matching taxon descendants, siblings, & ancestors #24

Open synrg opened 5 years ago

synrg commented 5 years ago

This is a big one that likely needs to be split into much smaller chunks and done one feature at a time. Ideally:

SyntheticBee: So it would be cool if my taxon finder could become a taxonomy browser. To accomplish this, I'd need a few menu buttons, and I think I'd also like to be able to have the user be able to type to change what the embed shows. Is there some cog that does this kind of interaction I could use as a model? Take the sparrow above, by an up-arrow action button, you could navigate back up the taxonomy tree, but say you wanted to match the children of a node you're at, you'd need the user to be able to type something to accomplish that, and then the embed could be updated to (or replaced with?) a taxon that matches what was typed, within the taxon currently shown. Left and right buttons could flip through taxa at the level you're at, and constraints could be placed so that you're not cycling through hundreds of those. For example [p]taxon zono browse nearby to browse species (descendants of 'Zonotrichia') starting at the zonotrichia genus, and nearby indicates a place filter based on the user's location previously made known to the bot. Ferret: check out the menu utility https://red-discordbot.readthedocs.io/en/latest/framework_utils.html#module-redbot.core.utils.menus there's also event predicates if you want a reply from the user

synrg commented 5 years ago

See also #25 and in similar vein, next and prev (or previous) qualifiers could browse siblings at the same taxonomy level. The same action could be supported in this feature as arrow buttons vs. using the last obs/taxon.

synrg commented 5 years ago

The last obs rank command now supports browsing from an observation back up to the taxon record for the named rank. It just needs support for doing that from a taxon to fulfill the "browse ancestors of a taxon" part of this issue.