#!/bin/sh
rm -f liste.html 
cat > liste.html <<===LISTE
<LI> <a href="Q0026+1259/Figures">Q0026+1259: Galaxies</a>
<LI> <a href="TONS180/Figures">Ton S 180: Galaxies</a>
<LI> <a href="TONS210/Figures">Ton S 210: Galaxies</a>
<LI> <a href="PKS0312-77/Figures">PKS0312-77: Galaxies</a>
<LI> <a href="PKS0405-123/Figures">PKS0405-123: Galaxies</a>
<LI> <a href="PKS0558-504/Figures">PKS0558-504: Galaxies</a>
<LI> <a href="PG1004+130/Figures">PG1004+130: Galaxies</a>
<LI> <a href="HE1029-140/Figures">HE1029-140: Galaxies</a>
<LI> <a href="PG1116+215/Figures">PG1116+215: Galaxies</a>
<LI> <a href="PG1211+143/Figures">PG1211+143: Galaxies</a>
<LI> <a href="PG1216+069/Figures">PG1216+069: Galaxies</a>
<LI> <a href="3C273/Figures">3C273: Galaxies</a>
<LI> <a href="Q1230+0947/Figures">Q1230+0947: Galaxies</a>
<LI> <a href="PKS1302-102/Figures">PKS1302-102: Galaxies</a>
<LI> <a href="PG1307+085/Figures">PG1307+085: Galaxies</a>
<LI> <a href="MRK1383/Figures">MRK1383: Galaxies</a>
<LI> <a href="Q1553+113/Figures">Q1553+113: Galaxies</a>
<LI> <a href="PKS2005-489/Figures">PKS2005-489: 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
