Advertising
- Karl
- Monday, May 7th, 2007 at 11:39:53pm MDT
- #!/bin/bash
- for DIR in *
- do
- if [ -d "$DIR" ]
- then
- echo "$DIR"
- echo "`echo $DIR | sed "s/ /+/g"`"
- cd "$DIR"
- for SUBDIR in *
- do
- if [ -d "$SUBDIR" ]
- then
- echo " $SUBDIR"
- echo " `echo $SUBDIR | sed "s/ /+/g"`"
- ARTIST=`echo $DIR | sed "s/ /+/g"`
- ALBUM=`echo $SUBDIR | sed "s/ /+/g"`
- wget `wget "http://www.slothradio.com/covers/index.php?adv=1&artist=$ARTIST&album=$ALBUM&genre=p&imgsize=x&locale=us&sort=%2Bsalesrank" -O - \
- | grep album0\
- | awk -F "\"" '{ print $4 }'\
- | head -n 1` -O "$SUBDIR/coverlg.jpg"
- convert "$SUBDIR/coverlg.jpg" -thumbnail 75x75 "$SUBDIR/cover.bmp"
- fi
- done
- cd ..
- fi
- done
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.