You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tags cog by @phenom4n4n now has Custom Blocks support which allows a developer to create custom commands that call into Dronefly code with a little code snippet like:
Once dronefly-core work has progressed to the point where it can be split from inatcog into its own package, we could provide various code blocks that do things like return the bionomial for a query, or just a genus, etc. as appropriate for the different kinds of custom command we would like. I understand this would be like this:
[p]tag global add xcsp https://www.xeno-canto.org/species/{binomial:{args}}
Where binomial is one of the ACCEPTED_NAMES for the block defined as per the example above, except importing dronefly-core and doing the actual binomial lookup in the process() method, then returning it with a dash between the genus and epithet, as xcsp requires.
The text was updated successfully, but these errors were encountered:
Note: since the code snippets are actually entered by the bot owner as a command, this enhancement is actually a request to document the command that would implement such a binomial command block, and not actually to produce code that is part of dronefly cog itself. Blockers for this, as mentioned above are:
dronefly-core does not yet actually access the API, so that would either have to be done via aiohttp as per phen's example code, or else (preferably) via pyinaturalist
dronefly-core needs to be its own package so that the custom block can import it & call into it
TODO: Both jobs should have separate issues filed for them.
The tags cog by @phenom4n4n now has Custom Blocks support which allows a developer to create custom commands that call into Dronefly code with a little code snippet like:
[p]tagset block add
See full doc here:
https://phen-cogs.readthedocs.io/en/latest/tags/owner_guide.html#custom-blocks
Once dronefly-core work has progressed to the point where it can be split from inatcog into its own package, we could provide various code blocks that do things like return the bionomial for a query, or just a genus, etc. as appropriate for the different kinds of custom command we would like. I understand this would be like this:
[p]tag global add xcsp https://www.xeno-canto.org/species/{binomial:{args}}
Where
binomial
is one of the ACCEPTED_NAMES for the block defined as per the example above, except importing dronefly-core and doing the actual binomial lookup in theprocess()
method, then returning it with a dash between the genus and epithet, as xcsp requires.The text was updated successfully, but these errors were encountered: