annotate perl/pet_descriptions.pl @ 28:118cb614cf18 judyates tip

judy bio.
author Robert McIntyre <rlm@mit.edu>
date Tue, 29 Dec 2015 16:26:18 -0800
parents 903b91a97990
children
rev   line source
rlm@0 1 %names = qw(
rlm@0 2 san_photo001 cat
rlm@0 3 san_photo002 cat
rlm@0 4 san_photo003 cat
rlm@0 5 san_photo004 cat
rlm@0 6 san_photo005 cat
rlm@0 7 san_photo0xx cat
rlm@0 8 san_photo0x2 cat
rlm@0 9 san_photo052 cat
rlm@0 10 san_photo053 cat
rlm@0 11 san_photo054 cat
rlm@0 12 san_photo010 dog
rlm@0 13 san_photo011 dog
rlm@0 14 san_photo012 dog
rlm@0 15 san_photo013 dog
rlm@0 16 san_photo014 dog
rlm@0 17 san_photo015 dog
rlm@0 18 san_photo016 dog
rlm@0 19 san_photo017 dog
rlm@0 20 san_photo018 dog
rlm@0 21 san_photo019 dog
rlm@0 22 san_photo020 dog
rlm@0 23 san_photo021 dog
rlm@0 24 san_photo022 dog
rlm@0 25 san_photo023 dog
rlm@0 26 san_photo024 dog
rlm@0 27 san_photo025 dog
rlm@0 28 san_photo026 dog
rlm@0 29 san_photo027 dog
rlm@0 30 san_photo028 dog
rlm@0 31 san_photo029 dog
rlm@0 32 san_photo030 dog
rlm@0 33 san_photo031 dog
rlm@0 34 san_photo032 dog
rlm@0 35 san_photo033 dog
rlm@0 36 san_photo034 dog
rlm@0 37 san_photo035 dog
rlm@0 38 san_photo036 dog
rlm@0 39 san_photo037 dog
rlm@0 40 san_photo038 dog
rlm@0 41 san_photo039 dog
rlm@0 42 san_photo040 dog
rlm@0 43 san_photo041 dog
rlm@0 44 san_photo042 dog
rlm@0 45 san_photo045 dog
rlm@0 46 san_photo046 dog
rlm@0 47 san_photo047 dog
rlm@0 48 san_photo048 dog
rlm@0 49 san_photo049 dog
rlm@0 50 san_photo050 dog
rlm@0 51 san_photo051 dog
rlm@0 52 san_photo055 dog
rlm@0 53 san_photo056 dog
rlm@0 54 san_photo057 dog
rlm@0 55 san_photo058 dog
rlm@0 56 san_photo006 horse
rlm@0 57 san_photo007 horse
rlm@0 58 san_photo008 horse
rlm@0 59 san_photo009 horse
rlm@0 60 );
rlm@0 61
rlm@0 62 @namess = qw
rlm@0 63
rlm@0 64 (
rlm@0 65 san_photo001
rlm@0 66 san_photo002
rlm@0 67 san_photo003
rlm@0 68 san_photo004
rlm@0 69 san_photo005
rlm@0 70 san_photo0x2
rlm@0 71 san_photo0xx
rlm@0 72 san_photo052
rlm@0 73 san_photo053
rlm@0 74 san_photo054
rlm@0 75 san_photo010
rlm@0 76 san_photo011
rlm@0 77 san_photo012
rlm@0 78 san_photo013
rlm@0 79 san_photo014
rlm@0 80 san_photo015
rlm@0 81 san_photo016
rlm@0 82 san_photo017
rlm@0 83 san_photo018
rlm@0 84 san_photo019
rlm@0 85 san_photo020
rlm@0 86 san_photo021
rlm@0 87 san_photo022
rlm@0 88 san_photo023
rlm@0 89 san_photo024
rlm@0 90 san_photo025
rlm@0 91 san_photo026
rlm@0 92 san_photo027
rlm@0 93 san_photo028
rlm@0 94 san_photo029
rlm@0 95 san_photo030
rlm@0 96 san_photo031
rlm@0 97 san_photo032
rlm@0 98 san_photo033
rlm@0 99 san_photo034
rlm@0 100 san_photo035
rlm@0 101 san_photo036
rlm@0 102 san_photo037
rlm@0 103 san_photo038
rlm@0 104 san_photo039
rlm@0 105 san_photo040
rlm@0 106 san_photo041
rlm@0 107 san_photo042
rlm@0 108 san_photo045
rlm@0 109 san_photo046
rlm@0 110 san_photo047
rlm@0 111 san_photo048
rlm@0 112 san_photo049
rlm@0 113 san_photo050
rlm@0 114 san_photo051
rlm@0 115 san_photo055
rlm@0 116 san_photo056
rlm@0 117 san_photo057
rlm@0 118 san_photo058
rlm@0 119 san_photo006
rlm@0 120 san_photo007
rlm@0 121 san_photo008
rlm@0 122 san_photo009);
rlm@0 123
rlm@0 124 foreach(0..$#namess){
rlm@0 125 $nnnum = $_;
rlm@0 126 $finla = $namess[$nnnum];
rlm@0 127 $prevla = $namess[$nnnum-1].".html";
rlm@0 128 $nextla = $namess[$nnnum+1].".html";
rlm@0 129 $galnum = int($nnnum/9 + 1);
rlm@0 130
rlm@0 131 if ($names{$finla} eq "dog"){
rlm@0 132 print "dog";
rlm@0 133 $galname = "Dogs";
rlm@0 134 $galla = "../pets2.html";}
rlm@0 135
rlm@0 136 if ($names{$finla} eq "cat"){
rlm@0 137 print "cat";
rlm@0 138 $galname = "Cats";
rlm@0 139 $galla = "../pets1.html";}
rlm@0 140
rlm@0 141 if ($names{$finla} eq "horse"){
rlm@0 142 print "horse";
rlm@0 143 $galname = "Horses";
rlm@0 144 $galla = "../pets3.html";}
rlm@0 145
rlm@0 146
rlm@0 147
rlm@0 148 print "../artwork_descriptions/$finla.html\n" ;
rlm@0 149 open FILE, ">../artwork_descriptions/$finla.html";
rlm@0 150
rlm@0 151
rlm@0 152
rlm@0 153 select FILE;
rlm@0 154
rlm@0 155 print <<HERE;
rlm@0 156 <html>
rlm@18 157 <head>
rlm@0 158 <title> Gallery of Original Artwork by Judy Yates</title>
rlm@18 159 <link rel="stylesheet" type="text/css" href="../firetest.css" />
rlm@18 160 <script type="text/javascript" src="/js/google_analytics.js"></script>
rlm@0 161 </head>
rlm@0 162 <body>
rlm@0 163 <span>
rlm@0 164 <img src = "../album_pics/3_logo.jpg"></img>
rlm@0 165 </span>
rlm@0 166 HERE
rlm@0 167
rlm@0 168 open MENU, "<../menu2.html";
rlm@0 169 while (<MENU>){print;}
rlm@0 170 close MENU;
rlm@0 171
rlm@0 172 print <<HERE;
rlm@0 173 <table cellpadding="0" cellspacing="0" width="740">
rlm@0 174
rlm@0 175
rlm@0 176 HERE
rlm@0 177
rlm@0 178 if($nnnum == 0){
rlm@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\">";
rlm@0 180 }
rlm@0 181
rlm@0 182 elsif ($nnnum == $#namess){
rlm@0 183
rlm@0 184 print "<tr><td><a class = \"menu\" href = \"$prevla\">Previous</a><a class = \"menu\" href = \"$galla\">$galname</a></td></tr><tr><td align = \"center\">";
rlm@0 185 }
rlm@0 186
rlm@0 187 else {
rlm@0 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\">";
rlm@0 189 }
rlm@0 190
rlm@0 191
rlm@0 192
rlm@0 193 print "<img src = \"../images/$finla.jpg\"></img>\n";
rlm@0 194
rlm@0 195 print <<HERE;
rlm@0 196
rlm@0 197 </td> </tr>
rlm@0 198 </table>
rlm@0 199
rlm@0 200
rlm@0 201
rlm@0 202
rlm@0 203 HERE
rlm@0 204
rlm@0 205
rlm@0 206
rlm@0 207
rlm@0 208 if (open TXT, "<../texts/$finla.txt"){
rlm@0 209 while (<TXT>){print;}
rlm@0 210 close TXT;
rlm@0 211 }
rlm@0 212
rlm@0 213
rlm@0 214
rlm@0 215 open MENU, "<../menu2.html";
rlm@0 216 while (<MENU>){print;}
rlm@0 217 close MENU;
rlm@0 218
rlm@0 219 print <<HERE;
rlm@0 220 </body>
rlm@0 221 </html>
rlm@0 222 HERE
rlm@0 223
rlm@0 224 close FILE;
rlm@18 225 select STDOUT; }