Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Analyze Your HN Posts with Watson User Modeling. Parent comment
function redcom(){ ! [ -z "$2" ] && i="&after=$2" || i=""; data=$(curl -s "https://www.reddit.com/user/${1}/comments.json?count=100${i}"); j=$(jq -e -r '.data["after"]' <<<$data); echo $j; (jq -e -r '.data["children"][]["data"]["body"]' <<<$data)>>${1}-redcom.txt; echo $(echo -e $data|wc -l) lines; ( [ "$j" = "null" ] || [ -z "$j" ] ) || redcom $1 $j ;} ;
Never user/heard of jq before, it's a pretty nice tool.
There are no comments on this comment yet.
Never user/heard of jq before, it's a pretty nice tool.