#!/bin/sh # constants htmlfile='@@temp.html' flickr_url='http://www.flickr.com' farm_url='http://farm4.static.flickr.com/' # style sheet css='" #debug #cat flickr.html \ curl -s $1 \ | nkf -wLu \ | egrep "^(page_p\.)|(var)" \ > $htmlfile gp_url=`cat $htmlfile | sed -e "s/^page_p\.url = \'\(.*\)\';$/\1/p" -e d` gp_title=`cat $htmlfile | sed -e "s/^page_p\.title = \'\(.*\)\';$/\1/p" -e d` gp_server=`cat $htmlfile | sed -e "s/^page_p\.server = \'\(.*\)\';$/\1/p" -e d` gp_id=`cat $htmlfile | sed -e "s/^page_p.id = \'\(.*\)\';$/\1/p" -e d` gp_secret=`cat $htmlfile | sed -e "s/^page_p.secret = \'\(.*\)\';$/\1/p" -e d` gp_ownersUrl=`cat $htmlfile | sed -e "s/^page_p.ownersUrl = \'\/photos\/\(.*\)\';$/\1/p" -e d` geo_possessed_username=`cat $htmlfile | sed -e "s/^var geo_possessed_username = \'\(.*\)\\\\\'s\';$/\1/p" -e d` photo_url="$flickr_url$gp_url" thumb_url="${farm_url}${gp_server}/${gp_id}_${gp_secret}.jpg" # #debug # echo "gp_url=$gp_url" # echo "gp_title=$gp_title" # echo "gp_server=$gp_server" # echo "gp_id=$gp_id" # # # echo "gp_secret=$gp_secret" # echo "gp_ownersUrl=$gp_ownersUrl" # echo "geo_possessed_username=$geo_possessed_username" # # # echo "photo_url=$photo_url" # echo "thumb_url=$thumb_url" rm -f $htmlfile # print html cat << KOREGA_KASANNATTARA_UGOKANAIO $css


$gp_title, originally uploaded by $geo_possessed_username.

KOREGA_KASANNATTARA_UGOKANAIO