#!/bin/sh
#
read tablo;
echo "Creation page html pour le français";
#
# Tableau 1
# Titre dans le title-bar et titre de la page.
read fic1;
echo "<html><head><title>Bouchon en français</title></head><body bgcolor=\"lightblue\"><h2><font color=\"red\"><CENTER>Bouchon en français</CENTER></font></h2><CENTER><table width=\"75%\" border=\"1\">" > $tablo;
# Creation table dans table
echo "<tr><td><CENTER><img src=\"../IMAGES/bouchonconteneur.jpg\"></CENTER></td><td rowspan=\"2\"><table width=\"100%\" border=\"1\"><tr><td bgcolor=\"white\" colspan=\"4\"><CENTER>CONTENEUR</CENTER></td></tr>" >> $tablo;
# Initialisation du compteur
i=1
# Outils : Wget, lynx, egrep et cat.
for nom1 in `cat $fic1`
{
wget -rO ./PAGES-ASPIREES/Francais/$i.html $nom1
lynx -dump -nolist $nom1 > ./DUMP-TEXT/Francais/$i.html
egrep -i "\bbouchon\b" ./DUMP-TEXT/Francais/$i.html > ./CONTEXTES/Francais/$i.html
cat ./CONTEXTES/Francais/$i.html >> ./CONTEXTES/conteneur-fr.txt
echo "<tr><td width=\"150\" align=\"center\"><a href=\"$nom1\">URL $i</a></td>
<td width=\"150\" align=\"center\"><a href=\"../PAGES-ASPIREES/Francais/$i.html\">PAGE ASPIREE</a></td>
<td width=\"150\" align=\"center\"><a href=\"../DUMP-TEXT/Francais/$i.html\">PAGE DUMP</a></td>
<td width=\"150\" align=\"center\"><a href=\"../CONTEXTES/Francais/$i.html\">PAGE CONTEXTE</a></td></tr>" >> $tablo;
let "i=i+1" ;
}
echo "</td></tr></table><tr><td bgcolor=\"white\"><iframe src=\"../NUAGES/contexte-conteneur-fr-dic.TXT.html\" width=\"100%\" height=\"100%\"></iframe></td></tr></table></CENTER>" >> $tablo;
#
# Tableau 2
read fic2;
echo "<p><CENTER><table width=\"75%\" border=\"1\">" >> $tablo;
echo "<tr><td><CENTER><img src=\"../IMAGES/bouchonembouteillage.jpg\"></CENTER></td><td rowspan=\"2\"><table width=\"100%\" border=\"1\"><tr><td bgcolor=\"white\" colspan=\"4\"><CENTER>EMBOUTEILLAGE</CENTER></td></tr>" >> $tablo;
# Outils : Wget, lynx, egrep et cat.
for nom2 in `cat $fic2`
{
wget -rO ./PAGES-ASPIREES/Francais/$i.html $nom2
lynx -dump -nolist $nom2 > ./DUMP-TEXT/Francais/$i.html
egrep -i "\bbouchon\b" ./DUMP-TEXT/Francais/$i.html > ./CONTEXTES/Francais/$i.html
cat ./CONTEXTES/Francais/$i.html >> ./CONTEXTES/embouteillage-fr.txt
echo "<tr><td width=\"150\" align=\"center\"><a href=\"$nom2\">URL $i</a></td>
<td width=\"150\" align=\"center\"><a href=\"../PAGES-ASPIREES/Francais/$i.html\">PAGE ASPIREE</a></td>
<td width=\"150\" align=\"center\"><a href=\"../DUMP-TEXT/Francais/$i.html\">PAGE DUMP</a></td>
<td width=\"150\" align=\"center\"><a href=\"../CONTEXTES/Francais/$i.html\">PAGE CONTEXTE</a></td></tr>" >> $tablo;
let "i=i+1" ;
}
echo "</td></tr></table><tr><td bgcolor=\"white\"><iframe src=\"../NUAGES/contexte-embouteillage-fr-dic.TXT.html\" width=\"100%\" height=\"100%\"></iframe></td></tr></table></CENTER>" >> $tablo;
#
# Tableau 3
read fic3;
echo "<p><CENTER><table width=\"75%\" border=\"1\">" >> $tablo;
echo "<tr><td><CENTER><img src=\"../IMAGES/bouchonlyonnais.jpg\"></CENTER></td><td rowspan=\"2\"><table width=\"100%\" border=\"1\"><tr><td bgcolor=\"white\" colspan=\"4\"><CENTER>RESTAURANT</CENTER></td></tr>" >> $tablo;
# Outils : Wget, lynx, egrep et cat.
for nom3 in `cat $fic3`
{
wget -rO ./PAGES-ASPIREES/Francais/$i.html $nom3
lynx -dump -nolist $nom3 > ./DUMP-TEXT/Francais/$i.html
egrep -i "\bbouchon\b" ./DUMP-TEXT/Francais/$i.html > ./CONTEXTES/Francais/$i.html
cat ./CONTEXTES/Francais/$i.html >> ./CONTEXTES/resto-fr.txt
echo "<tr><td width=\"150\" align=\"center\"><a href=\"$nom3\">URL $i</a></td>
<td width=\"150\" align=\"center\"><a href=\"../PAGES-ASPIREES/Francais/$i.html\">PAGE ASPIREE</a></td>
<td width=\"150\" align=\"center\"><a href=\"../DUMP-TEXT/Francais/$i.html\">PAGE DUMP</a></td>
<td width=\"150\" align=\"center\"><a href=\"../CONTEXTES/Francais/$i.html\">PAGE CONTEXTE</a></td></tr>" >> $tablo;
let "i=i+1" ;
}
echo "</td></tr></table><tr><td bgcolor=\"white\"><iframe src=\"../NUAGES/contexte-resto-fr-dic.TXT.html\" width=\"100%\" height=\"100%\"></iframe></td></tr></table></CENTER>" >> $tablo;
# fin du fichier html
echo "</td></tr></table></table></CENTER></body></html>" >> $tablo;