#!/bin/sh
# Flickr image integration for Blogger posts.  
# April 9, 2008 - ax0n (at) h-i-r (dot) net 
#        Syntax: ./fr.sh http://farmx.flickr.com/.... 
# Barfs out HTML you canpaste into blogger. Embeds the image from Flickr and 
# links to the page on flickr, assuming you configured it properly.  
#
# Edit the line below:
flickrbase="http://flickr.com/photos/yourflickrname/"
#
imgurl=$1
imgnum=`echo $imgurl | cut -f5 -d\/ | cut -f1 -d_`
pageurl=$flickrbase$imgnum
echo '<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="'$pageurl'"><img style="cursor:pointer; cursor:hand;width: 400px;" src="'$imgurl'" border="0" alt="" /></a>'
