[go: up one dir, main page]

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

A simple picocli/native-image ion-java CLI #988

Draft
wants to merge 2 commits into
base: ion-11-encoding
Choose a base branch
from

Conversation

jobarr-amzn
Copy link
Contributor

Issue #, if available:

Description of changes: Supports formatted transcription of input files or stdin to a destination file or stdout.

help showing subcommands

❯ jion help
Usage: jion [-hV] [-f=<format>] [-o=FILE] [FILE...] [COMMAND]
      [FILE...]
  -f, --format, --output-format=<format>
                      Output format, from the set (text | pretty | binary | none).
  -h, --help          Show this help message and exit.
  -o, --output=FILE   Output file
  -V, --version       Print version information and exit.
Commands:
  help          Display help information about the specified command.
  cat, process  concatenate FILE(s) in the requested Ion output format

help cat showing inherited options

❯ jion help cat
Usage: jion cat [-hV] [-f=<format>] [-o=FILE]
concatenate FILE(s) in the requested Ion output format
  -f, --format, --output-format=<format>
                      Output format, from the set (text | pretty | binary | none).
  -h, --help          Show this help message and exit.
  -o, --output=FILE   Output file
  -V, --version       Print version information and exit.

Rewriting Ion 1.1 with a macro invocation to Ion 1.0

❯ echo '$ion_1_1 (:make_string "hello" " " "world")' | jion cat -f binary | hexyl
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ e0 01 00 ea 8b 68 65 6c ┊ 6c 6f 20 77 6f 72 6c 64 │ו⋄××hel┊lo world│
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jobarr-amzn
Copy link
Contributor Author

Ah oops, I built this locally with GraalVM CE 17 as described in the comments in build.gradle.kts.

Looks like it will need more refinement of the build script to fix the build in other contexts- I want to only build the native component when GRAALVM_HOME is set. I can fix this... should probably extract to a separate Gradle project anyway.

- Supports formatted transcription of input files or stdin to a
  destination file or stdout
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.

1 participant