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

clemens.tolboom’s picture

Status: Active » Needs review

Oeps

clemens.tolboom’s picture

Changed function args in preperation of #1441026: Add a hook_drush_output_formats

clemens.tolboom’s picture

[Powered by #1115636: Issue Macros and Templates]

This issue depends on #1441026: Add a hook_drush_output_formats for its completion.

clemens.tolboom’s picture

greg.1.anderson’s picture

Version: » 8.x-6.x-dev

This should be revisited after #1866344: Make --pipe awesome with output format engines lands.

greg.1.anderson’s picture

Status: Needs review » Needs work

Adjusting status.

greg.1.anderson’s picture

Status: Needs work » Fixed

#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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.