dronefly-garden / dronefly

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

Consider replacing pyparsing with something better #106

Closed michaelpirrello closed 4 years ago

michaelpirrello commented 4 years ago

Per discussion.

synrg commented 4 years ago

My complaints here are:

synrg commented 4 years ago

I think a standard argument parser (a la unix command-line argument parser) would work here, except matching any keywords in the query (excluding stuff inside double-quotes) and prefixing them with -- to make them into options. Thus:

,t prunella in plants by me -> ,t prunella --in plants --by me

That's essentially the approach suggested here in the accepted solution to this question:

https://stackoverflow.com/questions/11310626/python-argparse-optional-arguments-without-dashes

synrg commented 4 years ago

Closed by 2e0f00181280d5ed2ce561a273c9be903985b87d.