#!/usr/local/bin/perl #SRCC Elevation Profiles web page my $rev_date = '04.14.2005'; my $designer = 'Alan Bloom'; my $image_url = '/img/profiles/'; my $profiles_html = '/profiles_html/'; my $photo_url = '/export/ftp/u/srcc/SRCC/img/profiles'; my $title_photo = 'geysers.GIF'; my $club_url = '/'; # web site host name my $return_to = 1; # Flag to include "Return to home page" links my $club_name = 'Santa Rosa Cycling Club'; my $club_abbr = 'SRCC'; my $title = "$club_abbr Elevation Profiles"; my $return_text = ''; if ($return_to) { $return_text = "

Return to $club_name."; } my ($nr_thumbnails, $n, $html_name, $road_name, @thumbnail_name, @dir_names); ############################ Main Routine #################################### print < $title The $club_name Elevation Profile Vault

Geysers Road
2711 feet (200 feet per division)
Geysers Rd elevation profile
25.48 miles

$return_text

Graphs of altitude versus distance for popular bicycle routes in the vicinity of Sonoma County, California. These graphs are generated from GPS (Global Positioning Satellite) data recorded mostly by SRCC member Lou Salz. Lou's GPS receiver includes a barometric altimeter to supplement the satellite data when the satellites are obscured from view. More Details

Click on a graphic to see the elevation profile:
END_OF_PRINT # Do photo table: opendir(DIR, "$photo_url") || print "Can't open photo directory $photo_url: $1"; @dir_names = readdir(DIR); closedir(DIR); $nr_thumbnails = 0; foreach (@dir_names) { if ($_ =~ /_thumb\.[^\.]+$/) { $thumbnail_name[$nr_thumbnails++] = $_; } } @thumbnail_name = sort(@thumbnail_name); print " \n"; for ($n=0; $n < $nr_thumbnails; $n++) { if (($n % 5) == 0) { if ($n != 0) { print " \n"; } print " \n"; } $html_name = $thumbnail_name[$n]; $html_name =~ s/^(.+)_thumb(\.[^\.]+$)/$1$2/; $html_name =~ s/\.[^\.]+$//; $road_name = make_name($html_name); $html_name .= '.HTM'; print " \n
\n"; print "
\n"; print " $road_name\n"; } print "
\n"; print <


Web page designer: $designer
Version $rev_date
END_OF_PRINT exit; ################################ Subroutines ################################# sub make_name { my $road_name = $_[0]; if (defined($road_name)) { $road_name =~ s/_/ /g; # Change underlines to spaces $road_name =~ s/(^.)/\u\1/; # Capitalize all words $road_name =~ s/( +)(.)/\1\u\2/g; } return $road_name; } __END__