#!/bin/sh
rm -f liste.html 
cat > liste.html <<===LISTE
<LI> <a href="PKS1302-102/Figures">PKS1302-102: Galaxies</a>
<LI> <a href="FJ2155-0922/Figures">FJ2155-0922: Galaxies</a>
<LI> <a href="PKS2155-304/Figures">PKS2155-304: Galaxies</a>
===LISTE

#U="http://www.ucolick.org/~xavier/WFCCDOVI"
#for f in `acut -d'"' -f2 liste.html | acut -d/ -f1`; do
#    for i in `grep '$f.*.jpg' list_images.txt`; do
#      echo "#...wwwget $U/$f/Figures/$i"
#      wwwget $U/$f/Figures/i > $f/$i
#    done
#done

U="http://www.ucolick.org/~xavier/WFCCDOVI"
for f in `acut -d'"' -f2 liste.html | acut -d/ -f1`; do
    mkdir $f
    echo "#...wget $U/$f/Figures/"
    wget $U/$f/Figures/ -O $f/$f.html
    for i in `grep '">.*.jpg' $f/$f.html | acut -d'"' -f8`; do
        echo "#...wget $U/$f/Figures/$i"
        wget $U/$f/Figures/$i -O $f/$i
    done
done
