Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #199: adding option -o to the converters #200

Merged
merged 2 commits into from
Sep 18, 2021

Conversation

andreasabel
Copy link
Contributor

With added option -o, the interfaces look like this:

$ yaml2json -h

yaml2json version 0.11.6.0 https://github.com/snoyberg/yaml/
Convert YAML to JSON.

Usage: yaml2json [IN] [-o|--output OUT]

Available options:
  -h,--help                Show this help text
  -V,--version             Show version info.
  --numeric-version        Show just version number.
  IN                       The input file containing the YAML document; use '-'
                           for stdin (default).
  -o,--output OUT          The file to hold the produced JSON document; use '-'
                           for stdout (default).

$ json2yaml -h

json2yaml version 0.11.6.0 https://github.com/snoyberg/yaml/
Convert JSON to YAML.

Usage: json2yaml [IN] [-o|--output OUT]

Available options:
  -h,--help                Show this help text
  -V,--version             Show version info.
  --numeric-version        Show just version number.
  IN                       The input file containing the JSON document; use '-'
                           for stdin (default).
  OUT                      The file to hold the produced YAML document; use '-'
                           for stdout (default).

The old call pattern 'json2yaml IN OUT' is also accepted, but deprecated.

$ yaml2json -h

    yaml2json version 0.11.6.0 https://github.com/snoyberg/yaml/
    Convert YAML to JSON.

    Usage: yaml2json [IN] [-o|--output OUT]

    Available options:
      -h,--help                Show this help text
      -V,--version             Show version info.
      --numeric-version        Show just version number.
      IN                       The input file containing the YAML document; use '-'
                               for stdin (default).
      -o,--output OUT          The file to hold the produced JSON document; use '-'
                               for stdout (default).

$ json2yaml -h

    json2yaml version 0.11.6.0 https://github.com/snoyberg/yaml/
    Convert JSON to YAML.

    Usage: json2yaml [IN] [-o|--output OUT]

    Available options:
      -h,--help                Show this help text
      -V,--version             Show version info.
      --numeric-version        Show just version number.
      IN                       The input file containing the JSON document; use '-'
                               for stdin (default).
      OUT                      The file to hold the produced YAML document; use '-'
                               for stdout (default).

    The old call pattern 'json2yaml IN OUT' is also accepted, but deprecated.
Copy link
Owner

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@snoyberg snoyberg merged commit 52b5c51 into snoyberg:master Sep 18, 2021
@andreasabel
Copy link
Contributor Author

Thanks for the best responsiveness to PRs ever!

@snoyberg
Copy link
Owner

That’s high praise, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants