lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (fwd)


From: Dmytro O. Redchuk
Subject: Re: (fwd)
Date: Tue, 21 Mar 2017 09:52:18 +0200

2017-03-21 9:40 GMT+02:00 Martin Tarenskeen <address@hidden>:
> Thanks. That's a good start. I have tried it, and it works. But yes, it
> looks ugly :-)
>
> I am trying to put this idea in a working bash or python script now.
> I am not really a virtuoso with grep and regular expressions, but I guess I
> could use that to extract the stringvalue after the "id": field from the
> response I am getting from the first line

Try jq:

https://stedolan.github.io/jq/

$ curl -X POST -H "Content-Type:application/json" \
   
https://7icpm9qr6a.execute-api.us-west-2.amazonaws.com/prod/prepare_preview/stable
\
   -d '{"code": "% LilyBin\n\\score{\n\t{\n\t\t\\repeat unfold 120 {
c4. d e f }\n\t}\n\n\t\\layout{}\n\t\\midi{}\n}\n"}' \
   2>/dev/null | jq '.id'
"1490082695988-7485-450035692-o06aeu4ly7dgqfr"

-- 
  Dmytro O. Redchuk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]