Open jamiguet opened 6 years ago
@jamiguet thanks for opening this, I agree it would be if tangling created a file that would generate the same response. I'll add this to the TODO list
It may help to reuse restclient mode as part of the fix as that mode incorporates the parsing and tangling functionality for rest calls in a very simple way.
If you don't have much time let me know I can assist and make a pull request.
The following code inside a org mode buffer does what it should. Make the request and then run the outpu json through jq and outpu in the buffer correctly formated json.
When tangled this is the output:
Which when executed does not work.
The situation can be improved if the block is modified in the following way
But then variables are not replaced nor declared in the script.
Lastly the :jq command is also ignored.
Ideally the tangling of both blocks should be:
Or follow some sort of pattern along those lines.
This would enable for the org mode document to be a prototyping environment where code and the reason why its used can live together (published as documentation) and tangled to produce running scripts.