#!/usr/bin/perl # make sure, that the path of perl is right (try: which perl5) ############################################################### # # Pix2tn by Michael Hahsler 1999 # Modified by Joel Martin 2001-2002 # # This script free for use and modification. # Version: 1.0 (18-Oct-1999) # # Usage: Copy this script into the directory with your photos or in # your directory for executables (e.g. ~/bin). Change to the directory # with the photos and run the script. The script will generate the # file welcome.html (the index) and the sub-directories tn and med # (for the thumpnails). # If you want to have the index and the pictures on the Web, the directory # you have to move everything to a directory used by your Web-server # (e.g. ~\www). # # Copyright: This script is under GPL # # You can reach me under hahsler@ai.wu-wien.ac.at # my $title="Type Titile Here!"; my $tnsize=100; # size of thumbnails my $tnquality=50; # quality of thumbnails [0..100] # use small thumbnails with poor quality to speed up your index-page # possible image extensions (jpg, gif) my @pics = (<*.jpg>,<*.gif>); #die "Problem: welcome.html exists!!!" if (-e "index.html"); open (PAGE, ">index.html") || die "Problem: Can't write to index.html\n"; print "Pix2tn by Michael Hahsler 1999\n"; # create a directory for the thumbnails system ("mkdir tn") if (!-d "tn"); # create the index page print PAGE qq*