#!/usr/bin/perl

$direc="sf1101";

#This program will take two arguments and place all valid lightvectors in a web page between the two arguments (inclusive).
#if ($#ARGV != 1){ die("you must enter start and end numbers values")};


if ($#ARGV==1) {
  $start=$ARGV[0];
  $end=$ARGV[1];
}
else {
  $start=100;
  $end=999;
  printf("start defaulting to %d; end defaulting to %d\n",$start,$end);
}


for ($pictnum=$start;$pictnum<=$end;$pictnum++) {
	if (-e "svjpg/sv$pictnum.jpg") {
     	   `cp vjpg/v$pictnum.jpg ~/public_html/$direc/v$pictnum.jpg`;
	   `cp svjpg/sv$pictnum.jpg ~/public_html/$direc/sv$pictnum.jpg`;            
	   `echo "\<a href=v$pictnum.jpg\>\<img src=sv$pictnum.jpg\>\</a\>$pictnum" >> ~/public_html/$direc/vindex.html`;
	}
}
