Make image gallery

edgar@cgn:~$ vi mk_gallery.sh


 * 1) !/bin/bash
 * 2) create image gallery for Edgar

for file in ~/public_html/images/* do convert -size 100 $file ~/public_html/images/thumbs/th-`basename $file` done
 * 1) make thumbs

php /home/edgar/mk_gallery.php > /home/edgar/public_html/index.html
 * 1) make html



edgar@cgn:~$ vi mk_gallery.php    Edgar's image gallery  FNORD;
 * 1) HTML Header

$html_foot = <<< FNORD Generated by FnordGallery V2.3 FNORD;
 * 1) HTML Footer


 * 1) HTML Body loop

foreach (glob("$image_dir/*") as $filename) { $basename=basename($filename); $html_body.="   $basename - size ". filesize($filename) ." B \n"; }

$html_output=$html_head.$html_body.$html_foot; return $html_output; }
 * 1) Give it back!

print mkgallery($image_dir,$thumbs_dir,$html_dir);
 * 1) Do it!

?> 

edgar@cgn:~$ ./mk_gallery.sh

-> http://cgn.sq23.de/~edgar/

(valid)