2017-03-21 9:40 GMT+02:00 Martin Tarenskeen <[email protected]>: > 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 _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
