pimoroni / plasma

Plasma LED driver, FX Sequencer and plugins
MIT License
17 stars 8 forks source link

Remove boilerplate argument parsing from examples, build into library #2

Closed Gadgetoid closed 3 years ago

Gadgetoid commented 4 years ago

The PlasmaLights library should have an automatic class which stands in place of the current arg parsing baked into the daemon:

https://github.com/pimoroni/plasma/blob/445ed4e723e0954b9002a075af594ad2523ef4c0/daemon/usr/bin/plasma#L66-L68

and every example:

https://github.com/pimoroni/plasma/blob/445ed4e723e0954b9002a075af594ad2523ef4c0/examples/rainbow.py#L26-L32

This should help keep examples lean and allow all code to take advantage of any improvements in CLI arguments and/or config files.