Inist-CNRS / node-jbj

Like XSL/XML but for JSON.
http://Inist-CNRS.github.io/jbj-playground/
13 stars 3 forks source link

bin/jbj #16

Closed kerphi closed 8 years ago

kerphi commented 8 years ago

It could be great to have a jbj command line.

use case:

cat data.json | jbj '{ "get": "test" }' > mytransformeddata.json

touv commented 8 years ago

or like xsltproc

cat data.json | jbj stylesheet.json -

On Wed, Nov 4, 2015 at 6:33 PM, Stéphane Gully notifications@github.com wrote:

It could be great to have a jbj command line.

use case:

cat data.json | jbj '{ "get": "test" }' > mytransformeddata.json

— Reply to this email directly or view it on GitHub https://github.com/Inist-CNRS/node-jbj/issues/16.

parmentf commented 8 years ago

Or a mix (I like to be able to use a command written on the command line):

$ cat data.json | jbj -e '{ "get": "test" }' > mytransformeddata.json
$ cat data.json | jbj -f stylesheet.json > mytransformeddata.json
$ cat data.json | jbj '{ "get": "test" }' > mytransformeddata.json
$ cat data.json | jbj -f stylesheet.json > mytransformeddata.json
$ cat data.json | jbj -e '{ "get": "test" }' > mytransformeddata.json
$ cat data.json | jbj stylesheet.json > mytransformeddata.json
kerphi commented 8 years ago

+1 for the mix

On Thu, Nov 5, 2015 at 9:23 AM, François Parmentier < notifications@github.com> wrote:

Or a mix (I like to be able to use a command written on the command line):

  1. à la sed:

$ cat data.json | jbj -e '{ "get": "test" }' > mytransformeddata.json $ cat data.json | jbj stylesheet.json > mytransformeddata.json

  1. on parameter by default:

$ cat data.json | jbj '{ "get": "test" }' > mytransformeddata.json $ cat data.json | jbj -s stylesheet.json > mytransformeddata.json

— Reply to this email directly or view it on GitHub https://github.com/Inist-CNRS/node-jbj/issues/16#issuecomment-153985479.

parmentf commented 8 years ago

Your wish is realized: Inist-CNRS/node-jbj-command

touv commented 8 years ago

congratulation !

On Wed, Nov 18, 2015 at 6:27 PM, François Parmentier < notifications@github.com> wrote:

Your wish is realized: Inist-CNRS/node-jbj-command https://github.com/Inist-CNRS/node-jbj-command

— Reply to this email directly or view it on GitHub https://github.com/Inist-CNRS/node-jbj/issues/16#issuecomment-157787306.

kerphi commented 8 years ago

Great work. Have to test it soon !