dronefly
dronefly copied to clipboard
last: subcommands for external taxon queries (bonap, etc.)
On iNat Discord we currently use the core customcom
cog to define search URLs to external systems for taxa. That works reasonably well, but requires a bit of extra work on the part of the user to properly format the URL and type the exact taxon name. This wishlist is for integration with the existing inat last
so that those external links can be more conveniently retrieved by the user. Here are a few custom commands we have defined so far:
Command: worms
Author: SyntheticBee#4951 (443127883846647808)
Created: 27/12/2019 09:31:26
Type: Normal
Responses:
- http://www.marinespecies.org/aphia.php?p=taxlist&action=search&tName={0}
Command: potwo
Author: SyntheticBee#4951 (443127883846647808)
Created: 23/12/2019 17:37:21
Type: Normal
Responses:
- http://www.plantsoftheworldonline.org/?q={0}
Command: bonap
Author: SyntheticBee#4951 (443127883846647808)
Created: 19/12/2019 20:12:45
Type: Normal
Responses:
- http://bonap.net/NAPA/TaxonMaps/Genus/County/{0}
In the case of bonap.net in particular, the URL will not work unless the user types the taxon name exactly, with uppercase, e.g.
,bonap Prunella
http://bonap.net/NAPA/TaxonMaps/Genus/County/Prunella
If implemented as an inat last
subcommand, the desired output would be:
,taxon self-heals
... embed for Prunella (self-heals) output ...
,last taxon bonap
http://bonap.net/NAPA/TaxonMaps/Genus/County/Prunella
Thanks to mws on iNat Discord for this suggestion.
Two alternatives to just enhancing last
would be:
- treat the subcommand as a modifier to the taxon query itself, e.g.
,taxon bonap self-heals
would function as a two-stage lookup, first for self-heals, then against bonap to provide the link - alternatively, provide a TaxonConverter and subclass the whole customcom cog to add this as a type hint so that we can write cc's with that converter like
,cc add http://bonap.net/NAPA/TaxonMaps/Genus/County/{0:taxon}
I really like the 2nd idea if it's not too much work. Example usage:
,bonap self-heals
http://bonap.net/NAPA/TaxonMaps/Genus/County/Prunella