[svn r5772] Moving rapidly towards XHTML 1.0...

This commit is contained in:
sb476 2004-04-21 17:24:24 +02:00
parent bd3a5a4f4b
commit 142363edf3

View File

@ -69,39 +69,35 @@ print INDXAL << "END";
<!-- LINKS -->
<hr>
<p>
<img alt="&gt;" src="../icons/lists/0.png">
<p><img alt="&gt;" src="../icons/lists/0.png">
Back to <a href="../index.htm">CUCC Home page</a><br>
<img alt="&gt;" src="../icons/lists/0.png">
Back to <a href="index.htm">Expedition Intro page</a><br>
Back to <a href="index.htm">Expedition Intro page</a></p>
<h3><img alt="&gt;" src="../icons/lists/0.png"> Main Indices:</h3>
<p>
<img alt="---&gt;" src="../icons/lists/1.png">
<p><img alt="---&gt;" src="../icons/lists/1.png">
<a href="infodx.htm"><b>Index</b> to Expo</a> information pages<br>
<img alt="---&gt;" src="../icons/lists/1.png">
<a href="areas.htm">Description of CUCC's area</a> and split to subareas<br>
<img alt="---&gt;" src="../icons/lists/1.png">
List of (links to) <a href="pubs.htm">published reports and logbooks</a><br>
List of (links to) <a href="pubs.htm">published reports and logbooks</a></p>
<h3><img alt="&gt;" src="../icons/lists/0.png"> Pictures:</h3>
<p>
<img alt="---&gt;" src="../icons/lists/1.png">
<p><img alt="---&gt;" src="../icons/lists/1.png">
<a href="gall0.htm">Text only Index</a><br>
<img alt="---&gt;" src="../icons/lists/1.png">
<a href="gallery/0.htm">Index pages (with thumbnails)</a><br>
<a href="gallery/0.htm">Index pages (with thumbnails)</a></p>
<h3><img alt="&gt;" src="../icons/lists/0.png"> Other info:</h3>
<p>
<img alt="---&gt;" src="../icons/lists/1.png">
<p><img alt="---&gt;" src="../icons/lists/1.png">
Table of <a href="folk/index.htm">members of CUCC expeditions</a> 1976-99<br>
<img alt="---&gt;" src="../icons/lists/1.png">
<a href="others/index.htm">Other groups</a> who have worked in the area.<br>
<img alt="---&gt;" src="../icons/lists/1.png">
<a href="1626/index.htm">Adjacent area 1626</a>
<a href="1626/index.htm">Adjacent area 1626</a></p>
<!-- /LINKS -->
</body>
@ -129,14 +125,20 @@ sub do_this_line {
$other_number = $_[3];
}
# Generate $number variable to hold kataster no. or other no. if no kataster no. present
my $number = $kat_num;
# Generate $linkid which will be kataster no., or other no. if no kataster no. present
my $linkid = $kat_num;
my $other_number_no_brackets = $other_number;
if ($kat_num and $other_number) {
$other_number = "($other_number)"; # wrap it in brackets, so it doesn't appear to be official
} elsif ($other_number and ! $kat_num) {
$number = $other_number;
$linkid = $other_number;
}
# Under XHTML 1.0, link ids must not have '(', '?', ' ', or '/'
$linkid =~ s/\//-/g;
$linkid =~ s/\?/q/;
$linkid =~ s/\(/:/;
$linkid =~ s/\)/:/;
$linkid =~ s/ /_/;
# Determine the number of directorys deep the caves main page is at in order to link to area descriptions and indxal
my $toroot = 'Q'; # hey; it's magic
@ -151,7 +153,7 @@ sub do_this_line {
if ($_[1] eq "cave") {
my $e = $ents;
$e =~ s/ +/&nbsp;/g;
print INDXAL "<tr><td><a name=\"$number\">$kat_num $other_number";
print INDXAL "<tr><td><a name=\"$linkid\">$kat_num $other_number";
if ($e) {
print INDXAL "<small> - $e</small>";
}
@ -197,10 +199,6 @@ sub do_this_line {
print "Progress: $file\n";
}
# Magic number processing
$number =~ s/\//-/g;
$number =~ s/\?/q/;
# Make the directory that the file is in, in case it doesn't exist yet
my $fn = $file;
$fn =~ s/^.*\///g;
@ -213,7 +211,7 @@ sub do_this_line {
print FILE << "END";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- *** This file is auto-generated by $progname - edit cavetab2.csv instead -->
<html lang=en>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
@ -223,7 +221,7 @@ END
if ($kat_num) {
print FILE "<title>1623:$kat_num";
} else {
print FILE "<title>$number";
print FILE "<title>$other_number";
}
print FILE << "END";
@ -236,7 +234,7 @@ END
END
if ($header) {
print FILE "$header\n";
print FILE "$header\n\n";
}
print FILE "<table border=\"0\" width=\"100%\">\n";
@ -273,20 +271,21 @@ END
if ($extent) {
print FILE "<b>Extent:</b> $extent ";
}
if ($length or $depth or $extent) {
print FILE "</p>";
}
# Entrance specific bit
unless ($mult_ents eq "yes") {
# If there is only one entrance
if ($tag_punkt or $other_punkt or $exact_punkt or $gpspostsa or $gpspresa or $easting or $northing or $altitude or $fix_type or $desc_other_punkt or $ent_name) {
print FILE "\n\n<p>";
unless ($ent_name) {
print FILE "<b>Entrance:</b>\n<br>\n";
}
# If there is only one entrance,
print FILE "\n\n<p>";
unless ($ent_name) {
print FILE "<b>Entrance:</b>";
}
# Process the location data for the entrance
do_ent($tag_punkt,$other_punkt,$exact_punkt,$gpspostsa,$gpspresa,$easting,$northing,$altitude,$ent_name,$fix_type,$desc_other_punkt);
print FILE "</p>"
} else {
# If there are multiple entrances
multi_ents($file, $kat_num, $other_number, $other_number_no_brackets, $toroot);
@ -294,120 +293,119 @@ END
# Cave general bit
if ($location) {
print FILE "\n\n<p><b>Location:</b> $location";
print FILE "\n\n<p><b>Location:</b> $location</p>";
}
if ($bearings) {
print FILE "\n\n<p><b>Bearings:</b> $bearings";
print FILE "\n\n<p><b>Bearings:</b> $bearings</p>";
}
if ($approach) {
print FILE "\n\n<p><b>Approach:</b> $approach";
print FILE "\n\n<p><b>Approach:</b> $approach</p>";
}
if ($map) {
print FILE "\n\n<p><b>Map:</b> $map";
print FILE "\n\n<p><b>Map:</b> $map</p>";
}
if ($ent_desc) {
print FILE "\n\n<p><b>Entrance Description:</b> $ent_desc";
print FILE "\n\n<p><b>Entrance Description:</b> $ent_desc</p>";
}
if ($ent_photo) {
print FILE "\n\n<p><b>Entrance Photo:</b> $ent_photo";
print FILE "\n\n<p><b>Entrance Photo:</b> $ent_photo</p>";
}
if ($marking and $marking ne "\r" and $marking ne "\r\n" and $marking ne "\n") { # bodgelicious.
print FILE "\n\n<p><b>Marking:</b> $marking";
print FILE "\n\n<p><b>Marking:</b> $marking</p>";
}
if ($references) {
print FILE "\n\n<p><b>References:</b> $references";
print FILE "\n\n<p><b>References:</b> $references</p>";
}
if ($u_description) {
print FILE "\n\n<p><b>Underground Description:</b> $u_description";
print FILE "\n\n<p><b>Underground Description:</b> $u_description</p>";
}
if ($equipment) {
print FILE "\n\n<p><b>Equipment:</b> $equipment";
print FILE "\n\n<p><b>Equipment:</b> $equipment</p>";
}
if ($qmlist) {
print FILE "\n\n<p><b>QM list:</b> $qmlist";
print FILE "\n\n<p><b>QM list:</b> $qmlist</p>";
}
if ($u_drawn_survey) {
print FILE "\n\n<p><b>Survey:</b> $u_drawn_survey";
print FILE "\n\n<p><b>Survey:</b> $u_drawn_survey</p>";
}
if ($notes) {
print FILE "\n\n<p><b>Notes:</b> $notes";
print FILE "\n\n<p><b>Notes:</b> $notes</p>";
}
if ($explorers) {
print FILE "\n\n<p><b>Explorers:</b> $explorers";
print FILE "\n\n<p><b>Explorers:</b> $explorers</p>";
}
if ($katstatus) {
print FILE "\n\n<p><b>Kataster Status:</b> $katstatus";
print FILE "\n\n<p><b>Kataster Status:</b> $katstatus</p>";
}
if ($u_centre_line) {
print FILE "\n\n<p><b>Centre Line:</b> $u_centre_line";
print FILE "\n\n<p><b>Centre Line:</b> $u_centre_line</p>";
}
if ($survex_file) {
print FILE "\n\n<p><b>Survex file:</b> $survex_file";
print FILE "\n\n<p><b>Survex file:</b> $survex_file</p>";
}
print FILE "\n\n<!-- LINKS -->\n<hr>\n<p>";
if ($footer) {
print FILE "$footer\n<p>";
print FILE "$footer</p>\n<p>";
}
# Find the area the cave is in, and add appropriate links
if ($area =~ /(1a|1b|1c|1d)/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/plateau\/index.htm#$number\">Plateau area index and description</a><br>";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/plateau\/index.htm#$linkid\">Plateau area index and description</a><br>\n";
}
if ($area =~ /(2a|2b)/) {
# we repeat this each time due to cave 39
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/smkridge\/index.htm#$number\">Schwarzmooskogel ridge area index and description</a><br>";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/smkridge\/index.htm#$linkid\">Schwarzmooskogel ridge area index and description</a><br>\n";
}
if ($area =~ /3/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/br-alm\/index.htm#$number\">Br&auml;uning Alm area index and description</a><br>";
print FILE "<a href=\"$toroot\/br-alm\/index.htm#$linkid\">Br&auml;uning Alm area index and description</a><br>\n";
}
if ($area =~ /4/) {
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "\n<a href=\"$toroot\/kratzer\/index.htm#$number\">Kratzer valley index and description</a><br>";
print FILE "<a href=\"$toroot\/kratzer\/index.htm#$linkid\">Kratzer valley index and description</a><br>\n";
}
if ($area =~ /5/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/wilden\/index.htm#$number\">Schwarzmoos-Wildensee area index and description</a><br>";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/wilden\/index.htm#$linkid\">Schwarzmoos-Wildensee area index and description</a><br>\n";
}
if ($area =~ /6/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/plateau\/index.htm#$number\">Far plateau area index and description</a><br>";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/plateau\/index.htm#$linkid\">Far plateau area index and description</a><br>\n";
}
if ($area =~ /7/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/egglgrub\/index.htm#$number\">Egglgrube area index and description</a><br>";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/egglgrub\/index.htm#$linkid\">Egglgrube area index and description</a><br>\n";
}
if ($area =~ /(8a|8b|8c|8d)/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/loser\/index.htm#$number\">Loser/Augst See area index and description</a><br>";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/loser\/index.htm#$linkid\">Loser/Augst See area index and description</a><br>\n";
}
if ($area =~ /9/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/gschwand\/index.htm#$number\">Gschwandt area index and description</a><br>";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/gschwand\/index.htm#$linkid\">Gschwandt area index and description</a><br>\n";
}
if ($area =~ /10/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/aaussee\/index.htm#$number\">N & NE shore of Altauseer See</a><br>";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/aaussee\/index.htm#$linkid\">N & NE shore of Altauseer See</a><br>\n";
}
if ($area =~ /11/) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/augstb\/index.htm#$number\">Augstbach area index and description</a><br>";
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"$toroot\/augstb\/index.htm#$linkid\">Augstbach area index and description</a><br>\n";
}
unless ($area) {
print FILE "\n<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"javascript:history.back(1)\">Go Back (Javascript)</a><br>"; # ACCK! ACCK! Evil JavaScript!
print FILE "<img alt=\"&gt;\" src=\"$toroot\/..\/icons\/lists\/0.png\">";
print FILE "<a href=\"javascript:history.back(1)\">Go Back (Javascript)</a><br>\n"; # ACCK! ACCK! Evil JavaScript!
}
# Finish writing to file
print FILE << "END";
<img alt="&gt;" src="$toroot/../icons/lists/0.png"><a href="$toroot/indxal.htm#$number">Full Index</a><br>
<img alt="&gt;" src="$toroot/../icons/lists/0.png"><a href="$toroot/indxal.htm#$linkid">Full Index</a><br>
<img alt="&gt;" src="$toroot/../icons/lists/0.png"><a href="$toroot/areas.htm">Other Areas</a><br>
<img alt="&gt;" src="$toroot/../icons/lists/0.png"><a href="$toroot/index.htm">Back to Expedition Intro page</a>
<img alt="&gt;" src="$toroot/../icons/lists/0.png"><a href="$toroot/index.htm">Back to Expedition Intro page</a></p>
<!-- /LINKS -->
</body>
@ -464,7 +462,7 @@ sub do_ent {
# Write out info for entrance
if ($ent_name) {
print FILE "<b>Entrance Name:</b> $ent_name\n\n<p>";
print FILE "<b>Entrance Name:</b> $ent_name ";
}
if ($altitude) {
print FILE "<b>Recorded Alt:</b> $altitude ";
@ -527,7 +525,7 @@ sub do_ent {
}
}
if ($calc_easting) {
print FILE "<br>Lookup values for $desc data: ";
print FILE "<br>\nLookup values for $desc data: ";
print FILE "<b>Alt:</b> $calc_altitude ";
print FILE "<b>N</b>$calc_northing ";
print FILE "<b>E</b>$calc_easting ";
@ -549,8 +547,8 @@ sub multi_ents {
my $other_number_no_brackets = $_[3];
my $toroot = $_[4];
print FILE "\n\n<p><b>Entrances:</b>";
print FILE "\n<menu>";
print FILE "\n\n<p><b>Entrances:</b></p>\n\n<p>";
print FILE "<ul>";
my $e_mult_ents;
# Process each entrance
@ -584,7 +582,7 @@ sub multi_ents {
$e_mult_ents = $emult_ents;
} while ($e_mult_ents ne "last entrance");
print FILE "\n</menu>";
print FILE "\n</ul></p>";
}
# Usage