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

Re #195: json2yaml now uses optparse-applicative #198

Merged
merged 3 commits into from
Sep 15, 2021

Conversation

andreasabel
Copy link
Contributor

Re #195: json2yaml now uses optparse-applicative

The help text now looks like this:

Reads a JSON document and writes it out as YAML document.

Usage: json2yaml [IN] [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.
  OUT                      The file to hold the produced YAML document; use '-'
                           for stdout.

Only semantic change: use die instead of error, so the error

json2yaml: Invalid input JSON
CallStack (from HasCallStack):
  error, called at exe/json2yaml.hs:19:20 in main:Main

is now just

json2yaml: Invalid input JSON

Also: mention json2yaml and friend in the README.

The help text now looks like this:

    Reads a JSON document and writes it out as YAML document.

    Usage: json2yaml [IN] [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.
      OUT                      The file to hold the produced YAML document; use '-'
                               for stdout.

Only semantic change: use `die` instead of `error`, so the error

    json2yaml: Invalid input JSON
    CallStack (from HasCallStack):
      error, called at exe/json2yaml.hs:19:20 in main:Main

is now just

    json2yaml: Invalid input JSON
… yaml2json

These executables haven't been mentioned in README so far.
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 81e9b29 into snoyberg:master Sep 15, 2021
@andreasabel andreasabel deleted the options-json2yaml branch September 15, 2021 12:20
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.

2 participants