#!/bin/sh # ---------------------------------------------------------------------- # $Id: yte 57 2006-04-13 02:22:53Z dlc $ # ---------------------------------------------------------------------- APPID=`echo $YAHOO_APPID` if [ x"$APPID" = x ] then echo 'You need to put your Yahoo! appid in $YAHOO_APPID' 1>&2 exit 1 fi if [ -z "$1" ] then DATA=`cat` else DATA=`cat $1 | sed -e 's/"/"/g'` fi curl -s -d appid=$APPID -d "context=$DATA" \ http://api.search.yahoo.com/ContentAnalysisService/V1/termExtraction | \ xmllint --format - | \ sed -ne 's! *\(.*\)!\1!p'