Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Another commenter mentioned http://watson-um-demo.mybluemix.net/demo above, so I threw this together in bash for reddit comments. Bit more of a pain that entering a username, but if you take this:

        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 ;} ;

run it in bash, then run redcom <user>, it should throw all your comments into <user>-redcom.txt which you can then copy/paste to http://watson-um-demo.mybluemix.net/demo


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: