#/bin/sh
test $# -eq 2||exec echo usage: $0 source target;
exec curl -H"Content-type: application/json" \
-d '{"source":"'$1'","target":"'$2'"}' \
https://api.sixdegreesofwikipedia.com/paths \
|exec sed '
s/\",/\"\
/g;s/,\"/\
\"/g;s/:{/:\
{/g;s/}/&\
/g;s/\"pages\":/&\
/'
It appears the author is using the Wikipedia API. I did not add any HTML tags, etc. to the output, although this is very easy to do.
Output:
Edit sed commands to make first line indented: