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

Provide machine-readable output for mithril-client #464

Closed
ghost opened this issue Aug 30, 2022 · 0 comments
Closed

Provide machine-readable output for mithril-client #464

ghost opened this issue Aug 30, 2022 · 0 comments
Assignees
Labels
D-easy Difficulty: easy good first issue 👋 Good for newcomers

Comments

@ghost
Copy link

ghost commented Aug 30, 2022

Why

When trying to use mithril-client in a script, using the docker image, I do the following:

$ docker run --rm -ti -e NETWORK=$NETWORK -e AGGREGATOR_ENDPOINT=$AGGREGATOR_ENDPOINT ghcr.io/input-output-hk/mithril-client:latest list
+---------+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
| Network | Epoch | Immutable | Digest                                                           | Size       | Locations | Created                        |
+---------+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
| testnet | 226   | 3119      | 8b259d5d2e88675a964bb9f118cddc90464ae5e4e8b73d10e631ed266af8b48f | 5712502757 |         1 | 2022-08-30T11:47:49.359596553Z |
+---------+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
| testnet | 226   | 3118      | e5c72a6843d3fbdc3ed916e5ae72bafc5b7377096ce1246ed382cf7e9e74b24e | 5712619005 |         1 | 2022-08-30T06:18:06.325716556Z |
+---------+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+
| testnet | 226   | 3117      | a2c47b13fad0b2bc7a95d29a9c0ea581c2e60eed67ad9a52e133ff6f47697049 | 5711586977 |         1 | 2022-08-30T00:09:02.446817513Z |
+---------+-------+-----------+------------------------------------------------------------------+------------+-----------+--------------------------------+

This format is not very suitable to machine consumption, eg. piping to jq to extract the latest available snapshot or other informations.

What

Provide a --raw or similar flag to mithril-client that outputs the same data in raw JSON format.

@ghost ghost added good first issue 👋 Good for newcomers D-easy Difficulty: easy labels Aug 30, 2022
@ghubertpalo ghubertpalo self-assigned this Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D-easy Difficulty: easy good first issue 👋 Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants