Skip to content

Support multiple output formats #3268

Open
@nvaken

Description

Currently, processing any data from the output of DC is a cumbersome task. Nothing is formatted in a decent way, except for human reading. I'd expect a --format flag in which you're able to define which output format you're expecting.

For example, running site:debug could look like following:

$ drupal site:debug --format=json site_name
{
	"root": "/var/www/html/site.ext/",
	"user": "foobar",
        "host": "site.ext"
}

Or:

$ drupal site:debug --format=yaml site_name
---
root: /var/www/html/site.ext/
user: foobar
host: site.ext

Of course, this should not be limited to site:debug and I think this should be a global flag. Though, this might have a lot of implications for the global structure of DC? Not sure.

Suggested formats

  • JSON
  • var_export / php
  • yaml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions