consolidation / output-formatters

Apply transformations to structured data to write output in different formats.
Other
192 stars 13 forks source link

Support output fields for all formats. #8

Closed greg-1-anderson closed 8 years ago

greg-1-anderson commented 8 years ago

See:

https://github.com/drush-ops/drush/issues/333

First step is easier here, since we have reorder fields factored out. The actual reordering of the data is done by the table transformation class, which also restructures the output.

It would be a small change to reorder the fields without restructuring the output. This would involve an extra redundant transformation when doing table output, but would keep the code clean and minimal, as field transformation could be done universally, before the specific formatter is called.

The alternate implementation would be to have every formatter individually handle formats -- as the code is currently set up to do. This isn't as good, though, as it would lead to duplication, and inconsistency.

greg-1-anderson commented 8 years ago

This was done some time ago.