Mercurial > judyates
view perl/pet_descriptions.pl @ 11:ed6ee381b8fd judyates
[svn r12] compressed photos and assembled them into a working web gallery
author | rlm |
---|---|
date | Mon, 12 Apr 2010 02:31:43 -0400 |
parents | 60668cf4f443 |
children | 903b91a97990 |
line wrap: on
line source
1 %names = qw(2 san_photo001 cat3 san_photo002 cat4 san_photo003 cat5 san_photo004 cat6 san_photo005 cat7 san_photo0xx cat8 san_photo0x2 cat9 san_photo052 cat10 san_photo053 cat11 san_photo054 cat12 san_photo010 dog13 san_photo011 dog14 san_photo012 dog15 san_photo013 dog16 san_photo014 dog17 san_photo015 dog18 san_photo016 dog19 san_photo017 dog20 san_photo018 dog21 san_photo019 dog22 san_photo020 dog23 san_photo021 dog24 san_photo022 dog25 san_photo023 dog26 san_photo024 dog27 san_photo025 dog28 san_photo026 dog29 san_photo027 dog30 san_photo028 dog31 san_photo029 dog32 san_photo030 dog33 san_photo031 dog34 san_photo032 dog35 san_photo033 dog36 san_photo034 dog37 san_photo035 dog38 san_photo036 dog39 san_photo037 dog40 san_photo038 dog41 san_photo039 dog42 san_photo040 dog43 san_photo041 dog44 san_photo042 dog45 san_photo045 dog46 san_photo046 dog47 san_photo047 dog48 san_photo048 dog49 san_photo049 dog50 san_photo050 dog51 san_photo051 dog52 san_photo055 dog53 san_photo056 dog54 san_photo057 dog55 san_photo058 dog56 san_photo006 horse57 san_photo007 horse58 san_photo008 horse59 san_photo009 horse60 );62 @namess = qw64 (65 san_photo00166 san_photo00267 san_photo00368 san_photo00469 san_photo00570 san_photo0x271 san_photo0xx72 san_photo05273 san_photo05374 san_photo05475 san_photo01076 san_photo01177 san_photo01278 san_photo01379 san_photo01480 san_photo01581 san_photo01682 san_photo01783 san_photo01884 san_photo01985 san_photo02086 san_photo02187 san_photo02288 san_photo02389 san_photo02490 san_photo02591 san_photo02692 san_photo02793 san_photo02894 san_photo02995 san_photo03096 san_photo03197 san_photo03298 san_photo03399 san_photo034100 san_photo035101 san_photo036102 san_photo037103 san_photo038104 san_photo039105 san_photo040106 san_photo041107 san_photo042108 san_photo045109 san_photo046110 san_photo047111 san_photo048112 san_photo049113 san_photo050114 san_photo051115 san_photo055116 san_photo056117 san_photo057118 san_photo058119 san_photo006120 san_photo007121 san_photo008122 san_photo009);124 foreach(0..$#namess){125 $nnnum = $_;126 $finla = $namess[$nnnum];127 $prevla = $namess[$nnnum-1].".html";128 $nextla = $namess[$nnnum+1].".html";129 $galnum = int($nnnum/9 + 1);131 if ($names{$finla} eq "dog"){132 print "dog";133 $galname = "Dogs";134 $galla = "../pets2.html";}136 if ($names{$finla} eq "cat"){137 print "cat";138 $galname = "Cats";139 $galla = "../pets1.html";}141 if ($names{$finla} eq "horse"){142 print "horse";143 $galname = "Horses";144 $galla = "../pets3.html";}148 print "../artwork_descriptions/$finla.html\n" ;149 open FILE, ">../artwork_descriptions/$finla.html";153 select FILE;155 print <<HERE;156 <html>157 <title> Gallery of Original Artwork by Judy Yates</title>158 <head>159 <link rel="stylesheet" type="text/css"160 href="../firetest.css" />161 </head>162 <body>163 <span>164 <img src = "../album_pics/3_logo.jpg"></img>165 </span>166 HERE168 open MENU, "<../menu2.html";169 while (<MENU>){print;}170 close MENU;172 print <<HERE;173 <table cellpadding="0" cellspacing="0" width="740">176 HERE178 if($nnnum == 0){179 print "<tr><td><a class = \"menu\" href = \"$galla\">$galname</a><a class = \"menu\" href = \"$nextla\">Next</a></td></tr><tr><td align = \"center\">";180 }182 elsif ($nnnum == $#namess){184 print "<tr><td><a class = \"menu\" href = \"$prevla\">Previous</a><a class = \"menu\" href = \"$galla\">$galname</a></td></tr><tr><td align = \"center\">";185 }187 else {188 print "<tr><td><a class = \"menu\" href = \"$prevla\">Previous</a><a class = \"menu\" href = \"$galla\">$galname</a><a class = \"menu\" href = \"$nextla\">Next</a></td></tr><tr><td align=\"center\">";189 }193 print "<img src = \"../images/$finla.jpg\"></img>\n";195 print <<HERE;197 </td> </tr>198 </table>203 HERE208 if (open TXT, "<../texts/$finla.txt"){209 while (<TXT>){print;}210 close TXT;211 }215 open MENU, "<../menu2.html";216 while (<MENU>){print;}217 close MENU;219 print <<HERE;220 </body>221 </html>222 HERE224 close FILE;225 select STDOUT; }