mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2025-01-30 07:02:44 +00:00
[svn r5085] *** empty log message ***
This commit is contained in:
parent
e6e5bc1acb
commit
b1fd11cb30
File diff suppressed because one or more lines are too long
@ -1,9 +1,20 @@
|
||||
#!/usr/bin/perl -w
|
||||
use strict;
|
||||
|
||||
|
||||
#Change to autogen directory, meking directory as nescessary
|
||||
-d "autogen" or mkdir "autogen", 0755;
|
||||
|
||||
open IDXALL, ">indxal.htm" or die $!;
|
||||
|
||||
#Read in pos file to @pos
|
||||
open INPUT2, "<all.pos";
|
||||
my @pos = <INPUT2>;
|
||||
close INPUT2;
|
||||
|
||||
|
||||
|
||||
#Start writing index file
|
||||
open IDXALL, ">..\/indxal.htm" or die $!;
|
||||
print IDXALL <<END;
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<!-- *** This file is auto-generated - edit cavetab.csv instead -->
|
||||
@ -18,14 +29,20 @@ print IDXALL <<END;
|
||||
<table border=0 frame=0>
|
||||
END
|
||||
|
||||
<>; # eat header line
|
||||
#Starting to read in csv file, eat header line
|
||||
<>;
|
||||
#While loop which reads in each line of csv file
|
||||
while (<>) {
|
||||
chomp;
|
||||
#get rid of any tabs
|
||||
y/\t/ /;
|
||||
#replace single quotes by double quotes
|
||||
s/\"\"/\"/g;
|
||||
#split one line of csv file into fragments which were seperated by commas
|
||||
my @fields = split(/,/, $_);
|
||||
#print "$_\n";
|
||||
#print @fields;
|
||||
# turn fragments back into one line, where fields are seperated by \t
|
||||
$_ = "\"\t";
|
||||
my $statement;
|
||||
foreach $statement (@fields)
|
||||
@ -65,97 +82,126 @@ while (<>) {
|
||||
#print "$_\n\n";
|
||||
s/"\t"/\t/g;
|
||||
s/\\"/"/g;
|
||||
|
||||
#print "$_\n\n";
|
||||
my ($dummy, $kat_num, $kat_status, $ents, $other_number, $mult_ents, $file, $name, $unofficial_name, $comment, $area, $no_info, $explorers, $u_description, $references, $u_centre_line, $u_drawn_survey, $survex_file, $length, $depth, $extent, $header, $notes, $ent_name, $tag_punkt, $other_punkt, $desc_other_punkt, $exact_punkt, $fix_type, $northing, $easting, $altitude, $bearings, $map, $location, $approach, $ent_desc, $ent_photo, $marking) = split /\t/, $_;
|
||||
#split single line into all the fields
|
||||
my ($dummy, $kat_num, $kat_status, $ents, $other_number, $mult_ents, $file, $name, $unofficial_name, $comment, $area, $no_info, $explorers, $u_description, $equipment, $qmlist, $katstatus, $references, $u_centre_line, $u_drawn_survey, $survex_file, $length, $depth, $extent, $header,$footer, $notes, $ent_name, $tag_punkt, $other_punkt, $desc_other_punkt, $exact_punkt, $fix_type, $gpspresa, $gpspostsa, $northing, $easting, $altitude, $bearings, $map, $location, $approach, $ent_desc, $ent_photo, $marking) = split /\t/, $_;
|
||||
#It is an ugly world out here. The last entry does not work the same as the rest so here is a bodge to fix it.
|
||||
if ($marking =~ m/(.*)...$/) {
|
||||
$marking = $1;
|
||||
}
|
||||
else{
|
||||
$marking="";
|
||||
}
|
||||
#print "$marking\n";
|
||||
#generate $number variable to hold kataster no. or other no. then empty other number if both are not present
|
||||
my $number = $kat_num;
|
||||
if ($number eq "") {
|
||||
$number = $other_number;
|
||||
$other_number = "";
|
||||
}
|
||||
|
||||
my $e = $ents;
|
||||
$e =~ s/ +/ /g;
|
||||
#print IDXALL "<dt><a name=\"$number\">$number <small>$e</small></a><dd>";
|
||||
print IDXALL "<tr><td><a name=\"$number\">$number <small>$e</small></a></td><td>";
|
||||
# if ($file eq "" && $number !~ m!/!) {
|
||||
$number =~ s/\//-/g;
|
||||
$number =~ s/\?/q/;
|
||||
$file = "autogen/$number.htm";
|
||||
#print "$file\n";
|
||||
open FILE, ">$file" or die $!;
|
||||
print FILE <<END;
|
||||
if ($file ne "") {
|
||||
$number =~ s/\//-/g;
|
||||
$number =~ s/\?/q/;
|
||||
|
||||
#print "$file\n";
|
||||
open FILE, ">..\/$file" or die $!;
|
||||
print FILE <<END;
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
||||
<html lang=en>
|
||||
<head>
|
||||
<title>
|
||||
END
|
||||
if ($kat_num ne "") {
|
||||
print FILE "1623:$kat_num\n";
|
||||
} else {
|
||||
print FILE "$number\n";
|
||||
}
|
||||
print FILE <<END;
|
||||
if ($kat_num ne "") {
|
||||
print FILE "1623:$kat_num\n";
|
||||
} else {
|
||||
print FILE "$number\n";
|
||||
}
|
||||
print FILE <<END;
|
||||
</title>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
END
|
||||
print FILE "$header\n";
|
||||
print FILE <<END;
|
||||
print FILE "$header\n";
|
||||
print FILE <<END;
|
||||
<table border=0 width=100%>
|
||||
<tr><th align=left><font size=+2>$number $ents</font></th>
|
||||
<th align=center><font size=+2>$name</font></th>
|
||||
<th align=right><font size=+2>$kat_status</font></th></tr>
|
||||
END
|
||||
if ($other_number ne "") {
|
||||
if ($unofficial_name ne "") {
|
||||
print FILE "<tr><th></th><th align=center lang=de><font size=+2>= $other_number ($unofficial_name)</font></th></tr>";
|
||||
if ($other_number ne "") {
|
||||
if ($unofficial_name ne "") {
|
||||
print FILE "<tr><th></th><th align=center lang=de><font size=+2>= $other_number ($unofficial_name)</font></th></tr>";
|
||||
}
|
||||
else {
|
||||
print FILE "<tr><th></th><th align=center lang=de><font size=+2>= $other_number</font></th></tr>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
print FILE "<tr><th></th><th align=center lang=de><font size=+2>= $other_number</font></th></tr>";
|
||||
if ($unofficial_name ne "") {
|
||||
print FILE "<tr><th></th><th align=center lang=de><font size=+2>($unofficial_name)</font></th></tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($unofficial_name ne "") {
|
||||
print FILE "<tr><th></th><th align=center lang=de><font size=+2>($unofficial_name)</font></th></tr>";
|
||||
}
|
||||
}
|
||||
print FILE <<END;
|
||||
print FILE <<END;
|
||||
|
||||
</table></center>
|
||||
<p>
|
||||
END
|
||||
if ($length ne "") {
|
||||
print FILE "<b>Length:</b> $length ";
|
||||
}
|
||||
if ($depth ne "") {
|
||||
print FILE "<b>Depth:</b> $depth ";
|
||||
}
|
||||
if ($extent ne "") {
|
||||
print FILE "<b>Extent:</b> $extent ";
|
||||
}
|
||||
print FILE "\n<p>\n";
|
||||
if ($length ne "") {
|
||||
print FILE "<b>Length:</b> $length ";
|
||||
}
|
||||
if ($depth ne "") {
|
||||
print FILE "<b>Depth:</b> $depth ";
|
||||
}
|
||||
if ($extent ne "") {
|
||||
print FILE "<b>Extent:</b> $extent ";
|
||||
}
|
||||
print FILE "\n<p>\n";
|
||||
|
||||
# Entrance specific bit
|
||||
if($mult_ents eq "yes"){
|
||||
print FILE "<menu>";
|
||||
my $e_mult_ents;
|
||||
do{
|
||||
my $e = <>;
|
||||
chomp;
|
||||
$e =~ y/\t/ /;
|
||||
$e =~ s/\"\"/\"/g;
|
||||
my @fields = split(/,/, $e);
|
||||
#print "$e\n";
|
||||
#print @fields;
|
||||
$e = "\"\t";
|
||||
my $statement;
|
||||
foreach $statement (@fields)
|
||||
{
|
||||
#print "$_ z\n";
|
||||
#print "$statement\n";
|
||||
if ($e =~ /\t$/)
|
||||
# If there are multiple entrances
|
||||
if($mult_ents eq "yes"){
|
||||
print FILE "<menu>";
|
||||
my $e_mult_ents;
|
||||
do{
|
||||
my $e = <>;
|
||||
chomp;
|
||||
$e =~ y/\t/ /;
|
||||
$e =~ s/\"\"/\"/g;
|
||||
my @fields = split(/,/, $e);
|
||||
#print "$e\n";
|
||||
#print @fields;
|
||||
$e = "\"\t";
|
||||
my $statement;
|
||||
foreach $statement (@fields)
|
||||
{
|
||||
if ($statement =~ /^"/)
|
||||
#print "$_ z\n";
|
||||
#print "$statement\n";
|
||||
if ($e =~ /\t$/)
|
||||
{
|
||||
if ($statement =~ /^"/)
|
||||
{
|
||||
if ($statement =~ /"$/)
|
||||
{
|
||||
$e = "$e$statement\t";
|
||||
}
|
||||
else
|
||||
{
|
||||
$e = "$e$statement,";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$e = "$e\"$statement\"\t";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($statement =~ /"$/)
|
||||
{
|
||||
@ -166,163 +212,315 @@ END
|
||||
$e = "$e$statement,";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$e = "$e\"$statement\"\t";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($statement =~ /"$/)
|
||||
{
|
||||
$e = "$e$statement\t";
|
||||
|
||||
#print "$e\n\n";
|
||||
$e =~ s/"\t"/\t/g;
|
||||
$e =~ s/\\"/"/g;
|
||||
#print "$_\n\n";
|
||||
my ($edummy, $ekat_num, $ekat_status, $eents, $eother_number, $emult_ents, $efile, $ename, $eunofficial_name, $ecomment, $earea, $eno_info, $eexplorers, $eu_description,$eequipment, $eqmlist, $ekatstatus, $ereferences, $eu_centre_line, $eu_drawn_survey, $esurvex_file, $elength, $edepth, $eextent, $eheader, $efooter, $enotes, $eent_name, $etag_punkt, $eother_punkt, $edesc_other_punkt, $eexact_punkt, $efix_type, $egpspresa, $egpspostsa, $enorthing, $eeasting, $ealtitude, $ebearings, $emap, $elocation, $eapproach, $eent_desc, $eent_photo, $emarking) = split /\t/, $e;
|
||||
#It is an ugly world out here. The last entry does not work the same as the rest so here is a bodge to fix it.
|
||||
if ($marking =~ m/(.*)...$/) {
|
||||
$marking = $1;
|
||||
}
|
||||
else{
|
||||
$marking="";
|
||||
}
|
||||
my $enumber = $ekat_num;
|
||||
if ($enumber eq "") {
|
||||
$enumber = $eother_number;
|
||||
$eother_number = "";
|
||||
}
|
||||
print FILE "\n<li>";
|
||||
if ($efile ne ""){
|
||||
print FILE "<a href=\"$efile\">";
|
||||
}
|
||||
print FILE "$enumber$eents";
|
||||
if ($efile ne ""){
|
||||
print FILE "</a>";
|
||||
}
|
||||
print FILE " ";
|
||||
# decide which epunkt to quote
|
||||
my $epunkt;
|
||||
if ($etag_punkt ne "") {
|
||||
$epunkt=$etag_punkt;
|
||||
}
|
||||
else
|
||||
{
|
||||
$e = "$e$statement,";
|
||||
elsif ($eother_punkt ne "") {
|
||||
$epunkt = $eother_punkt;
|
||||
}
|
||||
elsif ($eexact_punkt ne "") {
|
||||
$epunkt = $eexact_punkt;
|
||||
}
|
||||
else {
|
||||
$epunkt = "";
|
||||
}
|
||||
#Find the position of that punkt
|
||||
|
||||
if ($epunkt ne "") {
|
||||
#print "Looking for $epunkt\n";
|
||||
for my $surveypoint ( @pos ) {
|
||||
#print "b$surveypoint";
|
||||
#print "e";
|
||||
if ($surveypoint =~ m/\( *([0-9.\-]*), *([0-9.\-]*), *([0-9.\-]*) \) $epunkt(\r\n|\n|\r)/){
|
||||
$eeasting=$1;
|
||||
$enorthing=$2;
|
||||
$ealtitude=$3;
|
||||
#print "Found for $epunkt at $eeasting\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#print "$e\n\n";
|
||||
$e =~ s/"\t"/\t/g;
|
||||
$e =~ s/\\"/"/g;
|
||||
#print "$_\n\n";
|
||||
my ($edummy, $ekat_num, $ekat_status, $eents, $eother_number, $emult_ents, $efile, $ename, $eunofficial_name, $ecomment, $earea, $eno_info, $eexplorers, $eu_description, $ereferences, $eu_centre_line, $eu_drawn_survey, $esurvex_file, $elength, $edepth, $eextent, $eheader, $enotes, $eent_name, $etag_punkt, $eother_punkt, $edesc_other_punkt, $eexact_punkt, $efix_type, $enorthing, $eeasting, $ealtitude, $ebearings, $emap, $elocation, $eapproach, $eent_desc, $eent_photo, $emarking) = split /\t/, $e;
|
||||
my $enumber = $ekat_num;
|
||||
if ($enumber eq "") {
|
||||
$enumber = $eother_number;
|
||||
$eother_number = "";
|
||||
}
|
||||
print FILE "\n<li><a href=\"$efile\">$enumber$eents </a>";
|
||||
|
||||
if ($eent_name ne "") {
|
||||
print FILE " $eent_name";
|
||||
}
|
||||
if ($ealtitude ne "") {
|
||||
print FILE " Altitude: $ealtitude ";
|
||||
}
|
||||
if ($enorthing ne "") {
|
||||
print FILE " Northing: $enorthing ";
|
||||
}
|
||||
if ($eeasting ne "") {
|
||||
print FILE " Easting: $eeasting ";
|
||||
}
|
||||
if ($efix_type ne "") {
|
||||
print FILE " Fix type: $efix_type ";
|
||||
}
|
||||
if ($etag_punkt ne "") {
|
||||
print FILE "Fix position: tag";
|
||||
}
|
||||
else{
|
||||
if ($eother_punkt ne "") {
|
||||
if ($edesc_other_punkt ne "") {
|
||||
print FILE "Fix position: $edesc_other_punkt";
|
||||
#Write out info for entrance
|
||||
if ($eent_name ne "") {
|
||||
print FILE "$eent_name";
|
||||
}
|
||||
if ($ealtitude ne "") {
|
||||
print FILE "<b>Alt:</b> $ealtitude ";
|
||||
}
|
||||
if ($enorthing ne "") {
|
||||
print FILE "<b>N</b>$enorthing ";
|
||||
}
|
||||
if ($eeasting ne "") {
|
||||
print FILE "<b>E</b>$eeasting ";
|
||||
}
|
||||
if ($efix_type ne "") {
|
||||
print FILE "<b>Fix type:</b> $efix_type ";
|
||||
}
|
||||
if ($etag_punkt ne "") {
|
||||
print FILE "<b>Fix position:</b> tag ";
|
||||
}
|
||||
else{
|
||||
if ($eother_punkt ne "") {
|
||||
if ($edesc_other_punkt ne "") {
|
||||
print FILE "<b>Fix position:</b> $edesc_other_punkt ";
|
||||
}
|
||||
else{
|
||||
print FILE "<b>Fix position:</b> Do not know ";
|
||||
}
|
||||
}
|
||||
else{
|
||||
print FILE "Fix position: Do not know";
|
||||
if ($eexact_punkt ne "") {
|
||||
print FILE "<b>Fix position:</b> exact point ";
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($epunkt ne "") {
|
||||
print FILE "<b>Point name:</b> $epunkt ";
|
||||
}
|
||||
if ($egpspresa ne "") {
|
||||
print FILE "GPS pre sa: $egpspresa ";
|
||||
}
|
||||
if ($egpspostsa ne "") {
|
||||
print FILE "GPS pre sa: $egpspostsa ";
|
||||
}
|
||||
$e_mult_ents = $emult_ents;
|
||||
}
|
||||
while($e_mult_ents ne "last entrance");
|
||||
print FILE "</menu>";
|
||||
}
|
||||
#If there is only one entrance
|
||||
else{
|
||||
# decide which punkt to quote
|
||||
my $punkt;
|
||||
if ($tag_punkt ne "") {
|
||||
$punkt=$tag_punkt;
|
||||
}
|
||||
elsif ($other_punkt ne "") {
|
||||
$punkt = $other_punkt;
|
||||
}
|
||||
elsif ($exact_punkt ne "") {
|
||||
$punkt = $exact_punkt;
|
||||
}
|
||||
else {
|
||||
$punkt = "";
|
||||
}
|
||||
#Find the position of that punkt
|
||||
|
||||
if ($punkt ne "") {
|
||||
#print "Looking for $punkt\n";
|
||||
for my $surveypoint ( @pos ) {
|
||||
#print "b$surveypoint";
|
||||
#print "e";
|
||||
if ($surveypoint =~ m/\( *([0-9\.\-]*), *([0-9\.\-]*), *([0-9\.\-]*) \) $punkt(\r\n|\n|\r)/){
|
||||
$easting=$1;
|
||||
$northing=$2;
|
||||
$altitude=$3;
|
||||
#print "Found for $punkt at $easting\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
#Write out info for entrance
|
||||
if ($ent_name ne "") {
|
||||
print FILE "<b>Entrance Name:</b> $ent_name <p>";
|
||||
}
|
||||
if ($altitude ne "") {
|
||||
print FILE "<b>Alt:</b> $altitude ";
|
||||
}
|
||||
if ($northing ne "") {
|
||||
print FILE "<b>N</b>$northing ";
|
||||
}
|
||||
if ($easting ne "") {
|
||||
print FILE "<b>E</b>$easting ";
|
||||
}
|
||||
if ($fix_type ne "") {
|
||||
print FILE "<b>Fix type:</b> $fix_type ";
|
||||
}
|
||||
if ($tag_punkt ne "") {
|
||||
print FILE "<b>Fix position:</b> tag ";
|
||||
}
|
||||
else{
|
||||
if ($other_punkt ne "") {
|
||||
if ($desc_other_punkt ne "") {
|
||||
print FILE "<b>Fix position:</b> $desc_other_punkt ";
|
||||
}
|
||||
else{
|
||||
print FILE "<b>Fix position:</b> Do not know ";
|
||||
}
|
||||
}
|
||||
else{
|
||||
if ($eexact_punkt ne "") {
|
||||
print FILE "Fix position: on drip line/highest closed contour";
|
||||
if ($exact_punkt ne "") {
|
||||
print FILE "<b>Fix position:</b> exact point ";
|
||||
}
|
||||
}
|
||||
}
|
||||
$e_mult_ents = $emult_ents;
|
||||
}
|
||||
while($e_mult_ents ne "last entrance");
|
||||
print FILE "</menu>";
|
||||
}
|
||||
else{
|
||||
if ($ent_name ne "") {
|
||||
print FILE "<b>Entrance Name:</b> $ent_name <p>";
|
||||
}
|
||||
if ($altitude ne "") {
|
||||
print FILE "<b>Altitude:</b> $altitude ";
|
||||
}
|
||||
if ($northing ne "") {
|
||||
print FILE "<b>Northing:</b> $northing ";
|
||||
}
|
||||
if ($easting ne "") {
|
||||
print FILE "<b>Easting:</b> $easting ";
|
||||
}
|
||||
if ($fix_type ne "") {
|
||||
print FILE "<b>Fix type:</b> $fix_type ";
|
||||
}
|
||||
if ($tag_punkt ne "") {
|
||||
print FILE "<b>Fix position:</b> tag";
|
||||
}
|
||||
else{
|
||||
if ($other_punkt ne "") {
|
||||
if ($desc_other_punkt ne "") {
|
||||
print FILE "<b>Fix position:</b> $desc_other_punkt";
|
||||
}
|
||||
else{
|
||||
print FILE "<b>Fix position:</b> Do not know";
|
||||
}
|
||||
}
|
||||
else{
|
||||
if ($exact_punkt ne "") {
|
||||
print FILE "<b>Fix position:</b> exact point";
|
||||
}
|
||||
if ($punkt ne "") {
|
||||
print FILE "<b>Point name:</b> $punkt ";
|
||||
}
|
||||
if ($gpspresa ne "") {
|
||||
print FILE "GPS pre sa: $gpspresa ";
|
||||
}
|
||||
if ($gpspostsa ne "") {
|
||||
print FILE "GPS pre sa: $gpspostsa ";
|
||||
}
|
||||
}
|
||||
}
|
||||
# Cave general bit
|
||||
#print FILE "\n<p>\n";
|
||||
#print FILE "\n<p>\n";
|
||||
if ($location ne "") {
|
||||
print FILE "\n<p><b>Location:</b> $location";
|
||||
}
|
||||
}
|
||||
if ($bearings ne "") {
|
||||
print FILE "\n<p><b>Bearings:</b> $bearings";
|
||||
}
|
||||
}
|
||||
if ($approach ne "") {
|
||||
print FILE "\n<p><b>Approach:</b> $approach";
|
||||
}
|
||||
}
|
||||
if ($map ne "") {
|
||||
print FILE "\n<p><b>Map:</b> $map";
|
||||
}
|
||||
}
|
||||
if ($ent_desc ne "") {
|
||||
print FILE "\n<p><b>Entrance Description:</b> $ent_desc";
|
||||
}
|
||||
}
|
||||
if ($ent_photo ne "") {
|
||||
print FILE "\n<p><b>Entrance Photo:</b> $ent_photo";
|
||||
}
|
||||
}
|
||||
if ($marking ne "") {
|
||||
print FILE "\n<p><b>Marking:</b> $marking";
|
||||
}
|
||||
|
||||
if ($references ne "") {
|
||||
print FILE "\n<p><b>References:</b> $references";
|
||||
}
|
||||
if ($u_description ne "") {
|
||||
print FILE "\n<p><b>Underground Description:</b> $u_description";
|
||||
}
|
||||
if ($notes ne "") {
|
||||
print FILE "\n<p><b>Notes:</b> $notes";
|
||||
}
|
||||
if ($explorers ne "") {
|
||||
print FILE "\n<p><b>Explorers:</b> $explorers";
|
||||
}
|
||||
if ($u_centre_line ne "") {
|
||||
print FILE "\n<p><b>Centre Line:</b> $u_centre_line";
|
||||
}
|
||||
if ($u_drawn_survey ne "") {
|
||||
print FILE "\n<p><b>Survey:</b> $u_drawn_survey";
|
||||
}
|
||||
if ($survex_file ne "") {
|
||||
print FILE "\n<p><b>Survex file:</b> $survex_file";
|
||||
}
|
||||
print FILE <<END;
|
||||
|
||||
<hr>
|
||||
<!-- LINKS -->
|
||||
}
|
||||
if ($references ne "") {
|
||||
print FILE "\n<p><b>References:</b> $references";
|
||||
}
|
||||
if ($u_description ne "") {
|
||||
print FILE "\n<p><b>Underground Description:</b> $u_description";
|
||||
}
|
||||
if ($equipment ne "") {
|
||||
print FILE "\n<p><b>Equipment:</b> $equipment";
|
||||
}
|
||||
if ($qmlist ne "") {
|
||||
print FILE "\n<p><b>QM list:</b> $qmlist";
|
||||
}
|
||||
if ($u_drawn_survey ne "") {
|
||||
print FILE "\n<p><b>Survey:</b> $u_drawn_survey";
|
||||
}
|
||||
if ($notes ne "") {
|
||||
print FILE "\n<p><b>Notes:</b> $notes";
|
||||
}
|
||||
if ($explorers ne "") {
|
||||
print FILE "\n<p><b>Explorers:</b> $explorers";
|
||||
}
|
||||
if ($katstatus ne "") {
|
||||
print FILE "\n<p><b>Kataster Status:</b> $katstatus";
|
||||
}
|
||||
if ($u_centre_line ne "") {
|
||||
print FILE "\n<p><b>Centre Line:</b> $u_centre_line";
|
||||
}
|
||||
if ($survex_file ne "") {
|
||||
print FILE "\n<p><b>Survex file:</b> $survex_file";
|
||||
}
|
||||
print FILE "\n<hr>";
|
||||
print FILE "\n<!-- LINKS -->";
|
||||
if ($footer ne "") {
|
||||
print FILE "\n<p>$footer";
|
||||
}
|
||||
my $toroot;
|
||||
$toroot = "";
|
||||
print "\n$file has no slash";
|
||||
if ($file =~ /.*\/.*/) {
|
||||
$toroot = "../";
|
||||
print "one slash";
|
||||
}
|
||||
if ($file =~ /.*\/.*\/.*/) {
|
||||
$toroot = '../../';
|
||||
print "two slash";
|
||||
}
|
||||
if ($file =~ /.*\/.*\/.*\/.*/) {
|
||||
$toroot = '../../../';
|
||||
}
|
||||
if ($area =~ /(1a|1b|1c|1d)/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "plateau\/index.htm#$number\">Plateau area index and description</a><br>";
|
||||
}
|
||||
if ($area =~ /(2a|2b)/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "smkridge\/index.htm#$number\">Schwarzmooskogel ridge area index and description</a><br>";
|
||||
}
|
||||
if ($area =~ /3/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "br-alm\/index.htm#$number\">Bräuning Alm area index and description</a><br>";
|
||||
}
|
||||
if ($area =~ /4/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "kratzer\/index.htm#$number\">Kratzer valley index and description</a><br>";
|
||||
}
|
||||
if ($area =~ /5/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "wilden\/index.htm#$number\">Schwarzmoos-Wildensee area index and description</a><br>";
|
||||
}
|
||||
if ($area =~ /6/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "plateau\/index.htm#$number\">Far plateau area index and description</a><br>";
|
||||
}
|
||||
if ($area =~ /7/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "egglgrub\/index.htm#$number\">Egglgrube area index and description</a><br>";
|
||||
}
|
||||
if ($area =~ /(8a|8b|8c|8d)/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "loser\/index.htm#$number\">Loser/Augst See area index and description</a><br>";
|
||||
}
|
||||
if ($area =~ /9/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "gschwand\/index.htm#$number\">Gschwandt area index and description</a><br>";
|
||||
}
|
||||
if ($area =~ /10/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "aaussee\/index.htm#$number\">N & NE shore of Altauseer See</a><br>";
|
||||
}
|
||||
if ($area =~ /11/) {
|
||||
print FILE "\n<img alt=\">\" src=\"..\/..\/icons\/lists\/0.png\">";
|
||||
print FILE "\n<a href=\"$toroot";
|
||||
print FILE "augstb\/index.htm#$number\">Augstbach area index and description</a><br>";
|
||||
}
|
||||
print FILE <<END;
|
||||
<img alt=">" src="../../icons/lists/0.png">
|
||||
<!--
|
||||
<a href="index.htm#$number">Schwarzmooskogel ridge area</a><br>
|
||||
<img alt=">" src="../../icons/lists/0.png">
|
||||
-->
|
||||
<a href="../indxal.htm#$number">Full Index</a><br>
|
||||
<img alt=">" src="../../icons/lists/0.png">
|
||||
<a href="../areas.htm">Other Areas</a><br>
|
||||
@ -332,56 +530,16 @@ END
|
||||
</body>
|
||||
</html>
|
||||
END
|
||||
close FILE;
|
||||
# }
|
||||
if ($file ne "") {
|
||||
print IDXALL "<a href=\"$file\">";
|
||||
my $f = $file;
|
||||
$f =~ s/#.*//;
|
||||
if (! -f $f) {
|
||||
print STDERR "Warning: file `$f' not found\n";
|
||||
} else {
|
||||
open FILE, $f;
|
||||
my $n;
|
||||
while (<FILE>) {
|
||||
if (m!<font size=\+2(?: lang=[^>]*)?>([^>]*?)(?: |\s)+(?:$number)</font>!i) {
|
||||
$n = $1;
|
||||
last;
|
||||
}
|
||||
if (m!<font size=\+2(?: lang=[^>]*)?>([^>]*?(?:höhle|schacht|shaft))</font>!i) {
|
||||
$n = $1;
|
||||
last;
|
||||
}
|
||||
if (m!<th align=center><font size=\+2(?: lang=[^>]*)?>([^>]*?)</font>!i) {
|
||||
$n = $1;
|
||||
last;
|
||||
}
|
||||
if (m!<th align=center>([^>]*?)</th>!i) {
|
||||
$n = $1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
if (!defined $n) {
|
||||
print STDERR "no name found in $f for $number\n";
|
||||
} else {
|
||||
my $n2 = $n;
|
||||
my $name2 = $name;
|
||||
$n2 =~ s/ \(.*\)$//;
|
||||
$name2 =~ s/ \(.*\)$//;
|
||||
$n2 =~ s/ CUCC\b//;
|
||||
$name2 =~ s/ CUCC\b//;
|
||||
if ($name2 =~ m!^\Q$n2\E(?:[ /]\Q$number\E)?$!i) {
|
||||
#print STDERR "OK $number $n\n";
|
||||
} else {
|
||||
print STDERR "BAD $number : `$n' != `$name' in $f\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
|
||||
|
||||
if ($name eq "") {
|
||||
$name = "?";
|
||||
}
|
||||
if ($file ne "") {
|
||||
print IDXALL "<a href=\"$file\">";
|
||||
}
|
||||
print IDXALL $name;
|
||||
if (length $unofficial_name) {
|
||||
print IDXALL " ($unofficial_name)";
|
||||
|
Loading…
Reference in New Issue
Block a user