Mercurial > judyates
diff perl/pet_descriptions.pl @ 0:60668cf4f443 judyates
[svn r1] initial import
author | rlm |
---|---|
date | Sun, 03 Jan 2010 04:38:50 -0500 |
parents | |
children | 903b91a97990 |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/perl/pet_descriptions.pl Sun Jan 03 04:38:50 2010 -0500 1.3 @@ -0,0 +1,225 @@ 1.4 +%names = qw( 1.5 +san_photo001 cat 1.6 +san_photo002 cat 1.7 +san_photo003 cat 1.8 +san_photo004 cat 1.9 +san_photo005 cat 1.10 +san_photo0xx cat 1.11 +san_photo0x2 cat 1.12 +san_photo052 cat 1.13 +san_photo053 cat 1.14 +san_photo054 cat 1.15 +san_photo010 dog 1.16 +san_photo011 dog 1.17 +san_photo012 dog 1.18 +san_photo013 dog 1.19 +san_photo014 dog 1.20 +san_photo015 dog 1.21 +san_photo016 dog 1.22 +san_photo017 dog 1.23 +san_photo018 dog 1.24 +san_photo019 dog 1.25 +san_photo020 dog 1.26 +san_photo021 dog 1.27 +san_photo022 dog 1.28 +san_photo023 dog 1.29 +san_photo024 dog 1.30 +san_photo025 dog 1.31 +san_photo026 dog 1.32 +san_photo027 dog 1.33 +san_photo028 dog 1.34 +san_photo029 dog 1.35 +san_photo030 dog 1.36 +san_photo031 dog 1.37 +san_photo032 dog 1.38 +san_photo033 dog 1.39 +san_photo034 dog 1.40 +san_photo035 dog 1.41 +san_photo036 dog 1.42 +san_photo037 dog 1.43 +san_photo038 dog 1.44 +san_photo039 dog 1.45 +san_photo040 dog 1.46 +san_photo041 dog 1.47 +san_photo042 dog 1.48 +san_photo045 dog 1.49 +san_photo046 dog 1.50 +san_photo047 dog 1.51 +san_photo048 dog 1.52 +san_photo049 dog 1.53 +san_photo050 dog 1.54 +san_photo051 dog 1.55 +san_photo055 dog 1.56 +san_photo056 dog 1.57 +san_photo057 dog 1.58 +san_photo058 dog 1.59 +san_photo006 horse 1.60 +san_photo007 horse 1.61 +san_photo008 horse 1.62 +san_photo009 horse 1.63 +); 1.64 + 1.65 +@namess = qw 1.66 + 1.67 +( 1.68 +san_photo001 1.69 +san_photo002 1.70 +san_photo003 1.71 +san_photo004 1.72 +san_photo005 1.73 +san_photo0x2 1.74 +san_photo0xx 1.75 +san_photo052 1.76 +san_photo053 1.77 +san_photo054 1.78 +san_photo010 1.79 +san_photo011 1.80 +san_photo012 1.81 +san_photo013 1.82 +san_photo014 1.83 +san_photo015 1.84 +san_photo016 1.85 +san_photo017 1.86 +san_photo018 1.87 +san_photo019 1.88 +san_photo020 1.89 +san_photo021 1.90 +san_photo022 1.91 +san_photo023 1.92 +san_photo024 1.93 +san_photo025 1.94 +san_photo026 1.95 +san_photo027 1.96 +san_photo028 1.97 +san_photo029 1.98 +san_photo030 1.99 +san_photo031 1.100 +san_photo032 1.101 +san_photo033 1.102 +san_photo034 1.103 +san_photo035 1.104 +san_photo036 1.105 +san_photo037 1.106 +san_photo038 1.107 +san_photo039 1.108 +san_photo040 1.109 +san_photo041 1.110 +san_photo042 1.111 +san_photo045 1.112 +san_photo046 1.113 +san_photo047 1.114 +san_photo048 1.115 +san_photo049 1.116 +san_photo050 1.117 +san_photo051 1.118 +san_photo055 1.119 +san_photo056 1.120 +san_photo057 1.121 +san_photo058 1.122 +san_photo006 1.123 +san_photo007 1.124 +san_photo008 1.125 +san_photo009); 1.126 + 1.127 +foreach(0..$#namess){ 1.128 + $nnnum = $_; 1.129 + $finla = $namess[$nnnum]; 1.130 + $prevla = $namess[$nnnum-1].".html"; 1.131 + $nextla = $namess[$nnnum+1].".html"; 1.132 + $galnum = int($nnnum/9 + 1); 1.133 + 1.134 + if ($names{$finla} eq "dog"){ 1.135 + print "dog"; 1.136 + $galname = "Dogs"; 1.137 + $galla = "../pets2.html";} 1.138 + 1.139 + if ($names{$finla} eq "cat"){ 1.140 + print "cat"; 1.141 + $galname = "Cats"; 1.142 + $galla = "../pets1.html";} 1.143 + 1.144 + if ($names{$finla} eq "horse"){ 1.145 + print "horse"; 1.146 + $galname = "Horses"; 1.147 + $galla = "../pets3.html";} 1.148 + 1.149 + 1.150 + 1.151 + print "../artwork_descriptions/$finla.html\n" ; 1.152 + open FILE, ">../artwork_descriptions/$finla.html"; 1.153 + 1.154 + 1.155 + 1.156 + select FILE; 1.157 + 1.158 + print <<HERE; 1.159 +<html> 1.160 +<title> Gallery of Original Artwork by Judy Yates</title> 1.161 +<head> 1.162 +<link rel="stylesheet" type="text/css" 1.163 +href="../firetest.css" /> 1.164 +</head> 1.165 +<body> 1.166 +<span> 1.167 +<img src = "../album_pics/3_logo.jpg"></img> 1.168 +</span> 1.169 +HERE 1.170 + 1.171 +open MENU, "<../menu2.html"; 1.172 +while (<MENU>){print;} 1.173 +close MENU; 1.174 + 1.175 +print <<HERE; 1.176 +<table cellpadding="0" cellspacing="0" width="740"> 1.177 + 1.178 + 1.179 +HERE 1.180 + 1.181 +if($nnnum == 0){ 1.182 +print "<tr><td><a class = \"menu\" href = \"$galla\">$galname</a><a class = \"menu\" href = \"$nextla\">Next</a></td></tr><tr><td align = \"center\">"; 1.183 +} 1.184 + 1.185 +elsif ($nnnum == $#namess){ 1.186 + 1.187 +print "<tr><td><a class = \"menu\" href = \"$prevla\">Previous</a><a class = \"menu\" href = \"$galla\">$galname</a></td></tr><tr><td align = \"center\">"; 1.188 +} 1.189 + 1.190 +else { 1.191 +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\">"; 1.192 +} 1.193 + 1.194 + 1.195 + 1.196 +print "<img src = \"../images/$finla.jpg\"></img>\n"; 1.197 + 1.198 +print <<HERE; 1.199 + 1.200 +</td> </tr> 1.201 +</table> 1.202 + 1.203 + 1.204 + 1.205 + 1.206 +HERE 1.207 + 1.208 + 1.209 + 1.210 + 1.211 +if (open TXT, "<../texts/$finla.txt"){ 1.212 + while (<TXT>){print;} 1.213 +close TXT; 1.214 +} 1.215 + 1.216 + 1.217 + 1.218 +open MENU, "<../menu2.html"; 1.219 +while (<MENU>){print;} 1.220 +close MENU; 1.221 + 1.222 +print <<HERE; 1.223 +</body> 1.224 +</html> 1.225 +HERE 1.226 + 1.227 +close FILE; 1.228 +select STDOUT; } 1.229 \ No newline at end of file