I often use WebChangeMonitor (WCM) to monitor online JSON content.
To make it easier to compare the JSON content, I sometimes want to pretty print the JSON using jq before the comparison. To do this, I've been trying to configure a post-processing tool in WCM to perform this function. Unfortunately, everything I have tried thus far has not worked.
Some of the tool commands I have tried creating in WCM's Configuration > Files/Folders GUI include:
jq '.' %guid.new | sponge %guid.new
bash jq_script.sh (where jq_script.sh contains a shebang on the first line and the above command on the second line)
This is just a sample of the different techniques I have tried using.
None of these generate any errors, but none successfully perform the desired post-processing function. Most of these commands do work when issued directly from the Linux Mint terminal (replacing %guid with the correct filename).
Does anyone know how to get this to work, or at least have some good ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I often use WebChangeMonitor (WCM) to monitor online JSON content.
To make it easier to compare the JSON content, I sometimes want to pretty print the JSON using
jq
before the comparison. To do this, I've been trying to configure a post-processing tool in WCM to perform this function. Unfortunately, everything I have tried thus far has not worked.Some of the tool commands I have tried creating in WCM's
Configuration
>Files/Folders
GUI include:jq '.' %guid.new | sponge %guid.new
bash jq_script.sh
(wherejq_script.sh
contains a shebang on the first line and the above command on the second line)bash -c jq '.' %guid.new | sponge %guid.new
jq '.' "/fullpath/%guid.new" | sponge "/fullpath/%guid.new"
jq . "/fullpath/%guid.new" | sponge "/fullpath/%guid.new"
This is just a sample of the different techniques I have tried using.
None of these generate any errors, but none successfully perform the desired post-processing function. Most of these commands do work when issued directly from the Linux Mint terminal (replacing
%guid
with the correct filename).Does anyone know how to get this to work, or at least have some good ideas?