When having big outputs as json or array structures it is sometimes hard to preserve context.
By allowing output format like
drush etr file --format=properties
file.label = File
file.base table = file_managed
file.entity keys.id = fid
file.entity keys.label = filename
file.entity keys.revision =
file.entity keys.bundle =
file.static cache =
file.fieldable =
file.controller class = DrupalDefaultEntityController
file.field cache = 1
file.load hook = file_load
file.bundles.file.label = File
file.schema_fields_sql.base table.0 = fid
...
file.schema_fields_sql.base table.7 = timestamp
it is easier to follow and to grep like
drush er node 1 2 3 4 5 6 --format=properties | grep format
1.body.und.0.format = plain_text
2.body.und.0.format = full_html
3.body.und.0.format = filtered_html
4.body.und.0.format = full_html
5.body.und.0.format = filtered_html
6.body.und.0.format = plain_text
Related to #1366098: Automatically download Symfony YAML component but a mere necessity when trying to grasp output from #1005480: Create a new project to develop Drush entity support
The patch follows the key = value format taken from ie http://en.wikipedia.org/wiki/.properties
Comments
Comment #1
clemens.tolboomOeps
Comment #2
clemens.tolboomChanged function args in preperation of #1441026: Add a hook_drush_output_formats
Comment #3
clemens.tolboom[Powered by #1115636: Issue Macros and Templates]
This issue depends on #1441026: Add a hook_drush_output_formats for its completion.
Comment #4
clemens.tolboomUploaded a merged patch with #1441026: Add a hook_drush_output_formats for help with #1439692: Rename field language properties to langcode tomorrow.
Comment #5
greg.1.anderson commentedThis should be revisited after #1866344: Make --pipe awesome with output format engines lands.
Comment #6
greg.1.anderson commentedAdjusting status.
Comment #7
greg.1.anderson commented#1866344 has been committed, so work could resume here if desired.
The features from this patch are for the most part already implemented in the committed code, except there is also a 'properties' format here that is similar to the 'ini' format already implemented. I'm marking this as "fixed" under the assumption that perhaps the 'ini' format is close enough to what was proposed here. If there is any interest in discussing alternative implementations, though, this could be re-opened.